Difference between revisions of "Template:Q/doc"

From RimWorld Wiki
Jump to navigation Jump to search
m
Line 1: Line 1:
==Description==
+
== Description ==
 
This template shows the specified property of a page. Can be used within tables or anywhere.
 
This template shows the specified property of a page. Can be used within tables or anywhere.
  
==Syntax==
+
== Syntax ==
 
<code><nowiki>{{Q|page|property|default text|suffix|prefix}}</nowiki></code>
 
<code><nowiki>{{Q|page|property|default text|suffix|prefix}}</nowiki></code>
  
Line 14: Line 14:
 
Prefix: Text to be displayed immediately before the query result.
 
Prefix: Text to be displayed immediately before the query result.
  
==Samples==
+
== Samples ==
Typing:
+
'''Typing:'''
 
 
 
<code><nowiki>{{Q|Gold|Beauty Offset}}</nowiki></code>
 
<code><nowiki>{{Q|Gold|Beauty Offset}}</nowiki></code>
  
Gives:
+
'''Gives:'''
 
+
{{Q|Gold|Beauty Offset}}
12
 
 
 
 
 
Typing:
 
  
 +
'''Typing:'''
 
<code><nowiki>{{Q|Muffalo|Carrying Capacity|| kg|Muffalo carrying capacity: }}</nowiki></code>
 
<code><nowiki>{{Q|Muffalo|Carrying Capacity|| kg|Muffalo carrying capacity: }}</nowiki></code>
  
Gives:
+
'''Gives:'''
 
+
{{Q|Muffalo|Carrying Capacity|| kg|Muffalo carrying capacity: }}
Muffalo carrying capacity: 158 kg
 
  
 
<includeonly>[[Category:SMW templates]]</includeonly>
 
<includeonly>[[Category:SMW templates]]</includeonly>
 
<noinclude>[[Category:Template documentation]]</noinclude>
 
<noinclude>[[Category:Template documentation]]</noinclude>

Revision as of 14:20, 2 November 2022

Description

This template shows the specified property of a page. Can be used within tables or anywhere.

Syntax

{{Q|page|property|default text|suffix|prefix}}

Required parameters:
Page: The name of the page to be queried against.
Property: Show the value of this property.

Optional parameters:
Default text: Text to be displayed if the query has nothing to display. Typically this is N/A or a dash.
Suffix: Text to be displayed immediately after the query result.
Prefix: Text to be displayed immediately before the query result.

Samples

Typing: {{Q|Gold|Beauty Offset}}

Gives: 20

Typing: {{Q|Muffalo|Carrying Capacity|| kg|Muffalo carrying capacity: }}

Gives: Muffalo carrying capacity: 180 kg