Template:GetRecipesUsing: Difference between revisions

Jump to navigation Jump to search
no edit summary
(Undo revision 5091 by Fair (talk))
Tag: Undo
No edit summary
 
Line 28: Line 28:
         // Start printing of each ingredient to search for
         // Start printing of each ingredient to search for
         -->{{#arrayprint:$searchingr||@searchingr@|<!--
         -->{{#arrayprint:$searchingr||@searchingr@|<!--
           // If recipe is already valid or ingredient contains the search ingredient, set validrecipe variable to 1
           // If recipe is already valid or ingredient is equal to the search ingredient, set validrecipe variable to 1
           -->{{#ifeq:{{#expr:{{#if:{{#var:$validrecipe}}|1|0}} or {{#if:{{#pos:@ingredient@|@searchingr@}}|1|0}}}}|1|{{#vardefine:$validrecipe|1}}}}<!--
          // We have to explode and get the first part of ingredient by ",", because that's how the name and amount is divided up
           -->{{#ifeq:{{#expr:{{#if:{{#var:$validrecipe}}|1|0}} or {{#ifeq:{{#explode:@ingredient@|,|0}}|@searchingr@|1|0}}}}|1|{{#vardefine:$validrecipe|1}}}}<!--
         // End printing of each search ingredient
         // End printing of each search ingredient
         -->}}<!--
         -->}}<!--

Navigation menu