How to use the recipe builder templates

From Cookipedia
Revision as of 10:01, 10 January 2017 by Chef (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search


Why the different markup?

This wiki uses a non-standard system for the layout of the Ingredients & Method sections of all recipes. This should not be a problem if you use the automated recipe builder to create recipes as it will include the required markup automatically.

The new syntax is to create the correct MicroData HTML markup for all recipes so they conform to the Schema.org Recipe pragma.

This ensures that Cookipedia's recipes comply with the Google Rich snippets rules and are rewarded by inclusion of a thumbnail image and cooking time information on normal Google search listings.

The templates magically surround each line with the correct microformat tag display the line in the correct html list format.

Ingredients

The conventional syntax for the Ingredients listing is the MediaWiki unordered list bullet points

===Ingredients===

* Item one
* Item two
* Item 3...

The new system uses the template Template:RecipeIngredients to create the Microformat data from the ingredient listing and format the display correctly.

===Ingredients===
{{RecipeIngredients
 
 | Item 1
 | Item 2
 | Item 3...

 }} 

Method

The conventional syntax for the Method listing is the MediaWiki ordered list bullet points

===Method===

* Recipe method instruction line one
* Recipe method instruction line two
* Recipe method instruction line three...

The new system uses the template Template:RecipeMethod to create the Microformat data from the ingredient listing and format the display correctly.

===Method===
{{RecipeMethod
 
 | Recipe method instruction line one
 | Recipe method instruction line two
 | Recipe method instruction line three...

 }} 

Limitations

The templates are currently limited to a maximum of 25 items in each listing. If the the Method or Ingredients listing needs more than 25 items, the template must be used twice.

Method

{{RecipeMethod
 
 | Recipe method instruction line one
 | Recipe method instruction line two ...
 | Recipe method instruction line twenty five

 }} 
{{RecipeMethod
 
 | Recipe method instruction line twenty six ...
 | Recipe method instruction line twenty seven ...

 }} 

If the listing needs to be broken into two sections, again, the template needs to be used twice. see Pasta e fagioli.

Troubleshooting

  • Check the template name is spelt correctly and that the case matches.
  • Ensure the template start tags '{{' and end tags '}}' have been included.
  • Compare your problem page with any of the current Cookipedia recipes

Choosing the image displayed on Google's listing

To ensure the correct image is shown it should be selected by including the atl tag: alt=Electus

''|Image = [[Image:Stuffed butternut squash recipe.jpg|300px|alt=Electus]] 

See the results in action

The microdata markup has now been added to all the recipes on Cookipedia and the Recipe Builder automatically creates all of then new markup codes.

See also

#howtousetherecipebuildertemplates #help #pastaefagioli