Jump to content

Template:Tx/doc: Difference between revisions

From SeptemWiki
No edit summary
No edit summary
Line 1: Line 1:
{{metatemplate}}
{{metatemplate}}
== Purpose ==


This is just a simple way to display a template example in curly braces instead of typing out  
This is just a simple way to display a template example in curly braces instead of typing out  
Line 7: Line 9:
</pre>
</pre>


Example:
== Example ==


  <nowiki>{{tx|stub}}</nowiki>
  <nowiki>{{tx|stub}}</nowiki>


{{tx|stub}}
{{tx|stub}}
== Displaying more parameters ==


You can show up to 10 parameters without worrying about the pipe characters being parsed:
You can show up to 10 parameters without worrying about the pipe characters being parsed:
Line 18: Line 22:


{{tx|main|Triparic language}}
{{tx|main|Triparic language}}
== Displaying named parameters ==


But if you want to show a named parameter with an equals sign, you need to use {{tx|{{=}}}} to "protect" the equals sign:
But if you want to show a named parameter with an equals sign, you need to use {{tx|{{=}}}} to "protect" the equals sign:

Revision as of 17:26, 9 April 2016


Purpose

This is just a simple way to display a template example in curly braces instead of typing out

 <code> ... </code>

Example

{{tx|stub}}
{{stub}}

Displaying more parameters

You can show up to 10 parameters without worrying about the pipe characters being parsed:

{{tx|main|Triparic language}}
{{main|Triparic language}}

Displaying named parameters

But if you want to show a named parameter with an equals sign, you need to use

{{=}}

to "protect" the equals sign:

{{tx|foo|bar{{=}}baz}}
{{foo|bar=baz}}