Template:NW2: Difference between revisions
Template page
More actions
←Created page with '<span style="white-space:nowrap">{{#switch:{{{2}}} |c|tt={{#ifeq:{{{2}}}|c|<code>|<tt>}}{{#tag:nowiki|{{{3}}}}}{{#ifeq:{{{2}}}|c|</code>|</tt>}} |nw={{#ifeq:{{{1...' |
doc |
||
| Line 9: | Line 9: | ||
}} | }} | ||
}}</span><noinclude> | }}</span><noinclude> | ||
---- | ---- | ||
Prevents wrapping of lines like {{tl|nowrap}} (redirect: {{tl|NW}}) plus the option to also apply <tt>/<code> tags or <nowiki> tags or both. | Prevents wrapping of lines like {{tl|nowrap}} (redirect: {{tl|NW}}) plus the option to also apply <tt>/<code> tags or <nowiki> tags or both. This also works without any of those but if all you want is the no wrapping part use {{tl|NW}} instead. | ||
Note: The nowiki option makes use of {{mwl|tag}}, which doesn't work correctly with templates. | |||
The order doesn't matter as long as the ''text'' goes last (e.g. {{tlf|NW2|c|nw|''text''}} is the same as {{tlf|NW2|nw|c|''text''}}). | |||
* {{tlc|NW2|c|''text''}} - nowrap + <code> | |||
* {{tlc|NW2|tt|''text''}} - nowrap + <tt> | |||
* {{tlc|NW2|nw|''text''}} - nowrap + <nowiki> | |||
* {{tlc|NW2|c|nw|''text''}} - nowrap + <code> + <nowiki> | |||
* {{tlc|NW2|nw|tt|''text''}} - nowrap + <tt> + <nowiki> | |||
[[Category:Formatting templates|{{PAGENAME}}]] | [[Category:Formatting templates|{{PAGENAME}}]] | ||
</noinclude> | </noinclude> | ||
Revision as of 01:55, 18 July 2008
{{{1}}}
Prevents wrapping of lines like {{Nowrap}} (redirect: {{NW}}) plus the option to also apply <tt>/<code> tags or <nowiki> tags or both. This also works without any of those but if all you want is the no wrapping part use {{NW}} instead.
Note: The nowiki option makes use of Template:Mwl, which doesn't work correctly with templates.
The order doesn't matter as long as the text goes last (e.g. {{NW2|c|nw|text}} is the same as {{NW2|nw|c|text}}).
{{NW2|c|text}}- nowrap + <code>{{NW2|tt|text}}- nowrap + <tt>{{NW2|nw|text}}- nowrap + <nowiki>{{NW2|c|nw|text}}- nowrap + <code> + <nowiki>{{NW2|nw|tt|text}}- nowrap + <tt> + <nowiki>