Template:IngredientList: Difference between revisions

swap logic - since categories should be added in only 1 use case (the meal's page), the template defaults to not adding categories unless addCategories is added
(noCategories param as second param will not add categories to page for ingredients in list)
(swap logic - since categories should be added in only 1 use case (the meal's page), the template defaults to not adding categories unless addCategories is added)
Line 10: Line 10:
           |Vegetables={{ingredient|@@@@}}
           |Vegetables={{ingredient|@@@@}}
           |Slush Ice={{name|@@@@}}
           |Slush Ice={{name|@@@@}}
           |#default={{name|@@@@}}}} {{#ifeq:{{{2|}}}|noCategories||{{#switch:@@@@
           |#default={{name|@@@@}}}} {{#switch:{{{2|}}}
    |addCategories={{#switch:@@@@
           |Anglerfish
           |Anglerfish
           |Bass
           |Bass
Line 92: Line 93:
           |Zucchini
           |Zucchini
           |Vegetables=[[Category:Vegetable-Based Meals]]
           |Vegetables=[[Category:Vegetable-Based Meals]]
           |#default=}}}}}}<noinclude>[[Category:Formatting templates]]</noinclude>
           |#default=}}
    |noCategories
    |#default=}}}}<noinclude>[[Category:Formatting templates]]</noinclude>
moderator
27,045

edits