Difference between revisions of "Template:GetPartOrRecipeName"

From ChatWars Wiki
Jump to: navigation, search
m
m
Line 1: Line 1:
 
<includeonly><!--
 
<includeonly><!--
 
-->{{#show: {{{1| {{PAGENAME}} }}}
 
-->{{#show: {{{1| {{PAGENAME}} }}}
   | {{#ifeq: {{{2 | true }}} | true
+
   | {{#ifeq: {{{2| true }}} | true
 
       | {{#vardefine: type | Piece of Equipment}}
 
       | {{#vardefine: type | Piece of Equipment}}
 
       | {{#vardefine: type | Recipe (Item)}}
 
       | {{#vardefine: type | Recipe (Item)}}
 
     }}
 
     }}
 
}}{{#ask:
 
}}{{#ask:
   [[-Has subobject::{{#var: page}}]] [[Crafting ingredient.ItemType::{{#var: type}}]]
+
   [[-Has subobject::{{{1|}}}]] [[Crafting ingredient.ItemType::{{#var: type}}]]
 
     | mainlabel=-
 
     | mainlabel=-
 
     | headers=hide
 
     | headers=hide
Line 15: Line 15:
 
Gets the name of either the part or recipe of a given item.
 
Gets the name of either the part or recipe of a given item.
 
Parameters:
 
Parameters:
* <code>page = {{PAGENAME}}</code> - The page to search for parts or recipes in
+
* <code>page = {{PAGENAME}}</code> - The page to search for parts or recipes in (Param 1)
* <code>boolGetPart = true</code> - Searches and returns the [[Piece of Equipment]] of the given <code>page</code>
+
* <code>boolGetPart = true</code> - Searches and returns the [[Piece of Equipment]] of the given <code>page</code> (Param 2)
 
* <code>boolGetPart = false</code> - Searches and returns the [[Recipe (Item)]] of the given <code>page</code>
 
* <code>boolGetPart = false</code> - Searches and returns the [[Recipe (Item)]] of the given <code>page</code>
  
 
[[Category:Template]]
 
[[Category:Template]]
 
</noinclude>
 
</noinclude>

Revision as of 23:31, 27 June 2021

Gets the name of either the part or recipe of a given item. Parameters:

  • page = GetPartOrRecipeName - The page to search for parts or recipes in (Param 1)
  • boolGetPart = true - Searches and returns the Piece of Equipment of the given page (Param 2)
  • boolGetPart = false - Searches and returns the Recipe (Item) of the given page