Recipe
From SemanticOrganization
Messages
"semorg-recipe-template": "semorg-recipe",
"semorg-recipe-category": "semorg-recipe",
"semorg-recipe-form": "semorg-recipe",
"semorg-recipe-page-name": "Recipes",
"semorg-recipe-entity-name": "Recipe",
"semorg-form-recipe-create-title": "Create Recipe",
"semorg-form-recipe-edit-title": "Edit Recipe",
"semorg-form-recipe-template": "recipe",
"semorg-form-recipe-rows": "ingredients, rating, time, ingredient, source, preparation, name, category",
"semorg-list-recipe-headers": "recipe-name,recipe-category",
"semorg-field-recipe-category-name": "Category",
"semorg-field-recipe-category-parameters": "values from property=Semorg-recipe-category",
"semorg-field-recipe-category-input-type": "tokens",
"semorg-field-recipe-ingredient-name": "Ingredients",
"semorg-field-recipe-ingredient-parameters": "",
"semorg-field-recipe-ingredients-name": "Ingredients",
"semorg-field-recipe-ingredients-parameters": "holds template",
"semorg-field-recipe-name-name": "Name",
"semorg-field-recipe-name-parameters": "",
"semorg-field-recipe-preparation-name": "Preparation",
"semorg-field-recipe-preparation-parameters": "rows=1",
"semorg-field-recipe-preparation-input-type": "textarea",
"semorg-field-recipe-rating-name": "Rating",
"semorg-field-recipe-rating-parameters": "",
"semorg-field-recipe-rating-input-type": "rating",
"semorg-field-recipe-source-name": "Source",
"semorg-field-recipe-source-parameters": "rows=1",
"semorg-field-recipe-source-input-type": "textarea",
"semorg-field-recipe-time-name": "Preparation Time",
"semorg-field-recipe-time-parameters": "",
"semorg-field-recipe-time-suffix": "min",
"semorg-field-recipe-time-size": "5",
Form
<noinclude>{{semorg-bundle}}</noinclude><includeonly>{{{info |create title={{int:semorg-form-recipe-create-title}} |edit title={{int:semorg-form-recipe-edit-title}}<span class="d-none">: <page name></span> |page name=Recipes/ }}} {{semorg-form-template|recipe}} {{semorg-form-standard-inputs}} </includeonly>
as embedded:
Use this code, if this is not meant to be a standalone feature but rather a supplement that should be embedded in other forms. Add this line to a form definition that includes a field with the parameter holds template
. The second parameter of the semorg-form-template-embed
call should be the target field, specified with <feature>[<field>]
(e.g. meeting-group[files]
or {{int:semorg-meeting-group-template}}[files]
to respect template customization).
{{semorg-form-template-embed|recipe|}}
Category
{{semorg-category}}
Template
<noinclude>{{semorg-bundle}}</noinclude><includeonly>[[Category:{{int:semorg-recipe-category}}]]{{#semorg-set:recipe |ingredients={{{ingredients|}}} |rating={{{rating|}}} |time={{{time|}}} |ingredient={{{ingredient|}}} |source={{{source|}}} |preparation={{{preparation|}}} |name={{{name|}}} |category={{{category|}}} }}{{#semorg-detail:recipe |heading={{{name}}} }}{{#semorg-table:recipe |ingredients={{{ingredients|}}} |rating={{{rating|}}} |time={{{time|}}} |ingredient={{{ingredient|}}} |source={{{source|}}} |preparation={{{preparation|}}} |name={{{name|}}} |category={{{category|}}} }}</includeonly>
Row Template
<noinclude>{{semorg-bundle}}</noinclude><includeonly><tr> <td>[[{{{target|}}}]]</td> <td>{{{ingredients|}}}</td> <td>{{{rating|}}}</td> <td>{{{time|}}}</td> <td>{{{ingredient|}}}</td> <td>{{{source|}}}</td> <td>{{{preparation|}}}</td> <td>{{{name|}}}</td> <td>{{{category|}}}</td> {{semorg-showedit |target={{{target|}}} }} </tr></includeonly>
Overview Page Template
Template:Semorg-recipe-overview
<noinclude>{{semorg-bundle}}</noinclude><includeonly>{{#semorg-list:recipe |heading={{int:semorg-recipe-page-name}} |formlink={{#semorg-formlink:recipe}} |links={{{links|}}} |query={{{query|}}} |sort={{{sort|}}} |order={{{order|}}} |limit={{{limit|}}} |filter links={{{filter links|}}} |filters={{{filters|}}} |category={{{category|}}} |headers={{{headers|}}} |row template={{{row template|}}} |tableclass={{{tableclass|}}} |title={{{title|}}} |sums={{{sums|}}} |csv={{{csv|}}} |default={{{default|}}} |returnto={{{returnto|}}} |help={{{help|}}} }}</includeonly>
Overview Page
{{semorg-recipe-overview}}
Property Registration
Add the following line to LocalSettings.php
:
$wgSemorgAdditionalProperties['recipe'] = [ "id" => "RE","fields" => ["ingredients" => [ "id" => "INS","type" => "" ],"rating" => [ "id" => "RA","type" => "num" ],"time" => [ "id" => "TI","type" => "num" ],"ingredient" => [ "id" => "IN","type" => "txt" ],"source" => [ "id" => "SO","type" => "txt" ],"preparation" => [ "id" => "PR","type" => "txt" ],"name" => [ "id" => "NA","type" => "txt" ],"category" => [ "id" => "CA","type" => "txt" ], ] ];