Difference between revisions of "Template:Q/doc"

From RimWorld Wiki
Jump to navigation Jump to search
(Created doc page.)
 
 
(4 intermediate revisions by 3 users not shown)
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:'''
 +
<code><nowiki>{{Q|Muffalo|Carrying Capacity|| kg|Muffalo carrying capacity: }}</nowiki></code>
  
 +
'''Gives:'''
 +
{{Q|Muffalo|Carrying Capacity|| kg|Muffalo carrying capacity: }}
  
Typing:
+
=== Bulk examples ===
 +
This is inline {{Q|Gold|Beauty Offset}} this is inline
  
<code><nowiki>{{Q|Muffalo|Carrying Capacity|| kg|Muffalo carrying capacity: }}</nowiki></code>
+
This item doesn't exist and is inline {{Q|BLT sandwich|Beauty Offset}} this is inline
  
Gives:
+
This is directly put next to-{{Q|Gold|Beauty Offset}}, macaroni
  
Muffalo carrying capacity: 158 kg
+
Thinking up examples is making me hungry but this para doesn't exist,{{Q|Gold|Hungryness}}, oh well
  
 +
Ooh defaults this time {{Q|Gold|Beauty Offset|Sandwich}} yum yum
  
<includeonly>
+
What no sandwich what about now {{Q|Gold|Hungry Hungry|Sandwich}} yum yum
[[Category:Templates]]
 
</includeonly>
 
  
<noinclude>
+
All together now-{{Q|Gold|Hungry Hungry|Sandwich}}yum yum
[[Category:Template Documentation]]
+
<includeonly>[[Category:SMW templates]]</includeonly>
</noinclude>
+
<noinclude>[[Category:Template documentation]]</noinclude>

Latest revision as of 04:00, 14 November 2023

Description[edit]

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

Syntax[edit]

{{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[edit]

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

Gives: 20

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

Gives: Muffalo carrying capacity: 180 kg

Bulk examples[edit]

This is inline 20 this is inline

This item doesn't exist and is inline this is inline

This is directly put next to-20, macaroni

Thinking up examples is making me hungry but this para doesn't exist,, oh well

Ooh defaults this time 20 yum yum

What no sandwich what about now Sandwich yum yum

All together now-Sandwichyum yum