Difference between revisions of "Template:Braces/doc"
Jump to navigation
Jump to search
imported>Meteor sandwich yum m (→See also: add) |
imported>Meteor sandwich yum m (add to cat Typing-aids) |
||
| Line 19: | Line 19: | ||
* {{tl|ttt}} | * {{tl|ttt}} | ||
| − | <includeonly>[[Category:Wikipedia formatting and function templates|{{PAGENAME}}]]</includeonly> | + | <includeonly> |
| + | [[Category:Wikipedia formatting and function templates|{{PAGENAME}}]] | ||
| + | [[Category:Wikipedia typing-aids]] | ||
| + | </includeonly> | ||
Revision as of 22:25, 15 January 2014
| File:Edit-copy green.svg | This is a documentation subpage for Template:Braces. It contains usage information, categories and other content that is not part of the original template page. |
- The template returns the first unnamed parameter in double braces. To be used to demonstrate template code without the need for clunky nowiki'ing. Further unnamed parameters (up to 8 more) can be used without worrying for pipes.
- An alternative is to use {{foo}}.
- If the parameter tt (short for 'teletype', an early mono-spaced font) is set equal to any value apart from the null string, the font becomes a mono-spaced type which may be useful when displaying syntax format.
- [Note – This may well be changed to the specific setting, "tt= y" to reduce potential clashes if a template uses the named parameter tt for something else. This setting should therefore be used to ensure compatibility with future changes.]
- To improve legibility a 'thin-space' is inserted on each side of the pipe character '|' when displayed in transclusion.
- If detailing a template which requires 'named-variable = ....', use {{=}} for the equals sign
- Examples
- {{braces|template-name|value1|value2}} gives {{template-name | value1 | value2}}
- {{braces|tt=y|template-name|value1|value2}} gives
{{template-name | value1 | value2}} - {{braces|tt=y|template-name|value1{{=}}XYZ|value2{{=}}PQR}} gives
{{template-name | value1=XYZ | value2=PQR}}
BUT
- {{braces|tt=y|template-name|value1=XYZ|value2=PQR}} gives
{{template-name}}
See also