v50 Steam/Premium information for editors
  • v50 information can now be added to pages in the main namespace. v0.47 information can still be found in the DF2014 namespace. See here for more details on the new versioning policy.
  • Use this page to report any issues related to the migration.
This notice may be cached—the current version can be found here.

Difference between revisions of "Template:Tagvalue"

From Dwarf Fortress Wiki
Jump to navigation Jump to search
m
Line 1: Line 1:
<includeonly>{{#df_tagvalue:{{{1}}}|{{{2}}}|{{{notfound|not found}}}}}</includeonly><noinclude>
+
<includeonly>{{#df_tagvalue:{{{1}}}|{{{2}}}|{{{3|0}}}|{{{notfound|not found}}}}}</includeonly><noinclude>
Usage: <nowiki>{{ tagvalue | raw entry | tag name | notfound=placeholder text }}</nowiki>
+
Usage: <nowiki>{{ tagvalue | raw entry | tag name | number | notfound=placeholder text }}</nowiki>
  
Returns: value associated to that tag. uses the first tag encountered. If the tag is not found, the "notfound" parameter specifies what gets returned (defaults to "not found").
+
Returns: value associated to that tag. uses the (N+1)th (default first) tag encountered. If the tag is not found, the "notfound" parameter specifies what gets returned (defaults to "not found").
  
 
[[category:raw templates]]
 
[[category:raw templates]]
 
</noinclude>
 
</noinclude>

Revision as of 00:07, 19 March 2012

Usage: {{ tagvalue | raw entry | tag name | number | notfound=placeholder text }}

Returns: value associated to that tag. uses the (N+1)th (default first) tag encountered. If the tag is not found, the "notfound" parameter specifies what gets returned (defaults to "not found").