Editing Template:List/doc

Jump to navigation Jump to search

Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.

The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.

Latest revision Your text
Line 22: Line 22:
 
! Parameter !! Description
 
! Parameter !! Description
 
|-
 
|-
|<nowiki>{{{Name}}}</nowiki> || Name of the page
+
|<nowiki>{{{?Name}}}</nowiki> || Name of the page
 
|-
 
|-
|<nowiki>{{{Image}}}</nowiki> || Name of the icon for the page
+
|<nowiki>{{{?Image}}}</nowiki> || Name of the icon for the page
 
|-
 
|-
|<nowiki>{{{Description}}}</nowiki> || Description of the page (from XML)
+
|<nowiki>{{{?Description}}}</nowiki> || Description of the page (from XML)
 
|-
 
|-
|<nowiki>{{{Note}}}</nowiki> || Description of the page (user-set, usually the first paragraph of the page content)
+
|<nowiki>{{{?Note}}}</nowiki> || Description of the page (user-set, usually the first paragraph of the page content)
 
|-
 
|-
|<nowiki>{{{Tags}}}</nowiki> || Name of the template that can produce the tags for the page
+
|<nowiki>{{{?Tags}}}</nowiki> || Name of the template that can produce the tags for the page
 
|-
 
|-
 
|<nowiki>{{{userparam}}}</nowiki> || Value passed to ''param='' in the list template
 
|<nowiki>{{{userparam}}}</nowiki> || Value passed to ''param='' in the list template
Line 59: Line 59:
 
     }}</nowiki>
 
     }}</nowiki>
  
The first line tells SMW to look for all pages in the [[:Category: Fabric]] category. The new five lines start with ? and tell it which data to select from those pages (more about that below). The "?# = Name" means "take the page title and refer to it as Name". After that, the template tells SMW to called the [[Template:Ask/Item]] template for every result (format = template and template = Ask/Item), to pass along the data as named arguments, and to use only page names instead of links (e.g. "Devilstrand" instead of "<nowiki>[[Devilstrand]]</nowiki>").
+
The first line tells SMW to look for all pages in the [[:Category: Fabric]] category. The new five lines start with ? and tell it which data to select from those pages (more about that below). The "?# = Name" means "take the page title and refer to it as ?Name". After that, the template tells SMW to called the [[Template:Ask/Item]] template for every result (format = template and template = Ask/Item), to pass along the data as named arguments, and to use only page names instead of links (e.g. "Devilstrand" instead of "<nowiki>[[Devilstrand]]</nowiki>").
  
 
Thus, the above template call becomes:
 
Thus, the above template call becomes:
  
     <nowiki>{{Ask/Item|Name=Hyperweave|Image=File:Hyperweave.png|Description=High-tech nano-fibers...|Note=Top-of-the-shelf, incredibly tough...|Tags=Template:Textile/Tags}}</nowiki>
+
     <nowiki>{{Ask/Item|?Name=Hyperweave|?Image=File:Hyperweave.png|?Description=High-tech nano-fibers...|?Note=Top-of-the-shelf, incredibly tough...|?Tags=Template:Textile/Tags}}</nowiki>
     <nowiki>{{Ask/Item|Name=Devilstrand|Image=File:Devilstrand.png|Description=Fabric spun...|Note=Devilstrand is obtained...|Tags=Template:Textile/Tags}}</nowiki>
+
     <nowiki>{{Ask/Item|?Name=Devilstrand|?Image=File:Devilstrand.png|?Description=Fabric spun...|?Note=Devilstrand is obtained...|?Tags=Template:Textile/Tags}}</nowiki>
  
 
These are then substituted normally again.
 
These are then substituted normally again.
  
(NB: Template:Textile/Tags does not exist yet, so the Tags parameter above is empty at the moment. This will change soon.)
+
(NB: Template:Textile/Tags does not exist yet, so the ?Tags parameter above is empty at the moment. This will change soon.)
  
 
== Where does the data come from? ==
 
== Where does the data come from? ==
Line 78: Line 78:
  
 
You can browse the data available about a page by using the "Browse Properties" link under "Tools" in the menu on the left side of the screen. You can browse all page/value pairs for a property by visiting its page in the Property: namespace, e.g. [[Property:Market_Value_Base]].
 
You can browse the data available about a page by using the "Browse Properties" link under "Tools" in the menu on the left side of the screen. You can browse all page/value pairs for a property by visiting its page in the Property: namespace, e.g. [[Property:Market_Value_Base]].
 
<includeonly>[[Category:SMW templates]]</includeonly>
 
<noinclude>[[Category:Template documentation]]</noinclude>
 

Please note that all contributions to RimWorld Wiki are considered to be released under the CC BY-SA 3.0 (see RimWorld Wiki:Copyrights for details). If you do not want your writing to be edited mercilessly and redistributed at will, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource. Do not submit copyrighted work without permission!

Cancel Editing help (opens in new window)