Jump to content
Toggle menu
  • 3 articles
  • 75 files
  • 7 users
  • 37.9K edits
Neodyland Wiki
Toggle preferences menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

Template:NW2: Difference between revisions

Template page
m replacing deprecated template redirect
→template-documentation: Move template category declarations to subpage
Line 1: Line 1:
<span style="white-space:nowrap">{{#switch:{{{2}}}
<onlyinclude><span style="white-space:nowrap">{{#switch:{{{2}}}
  |c|tt={{#ifeq:{{{2}}}|c|<code>|<tt>}}{{#tag:nowiki|{{{3}}}}}{{#ifeq:{{{2}}}|c|</code>|</tt>}}
  |c|tt={{#ifeq:{{{2}}}|c|<code>|<tt>}}{{#tag:nowiki|{{{3}}}}}{{#ifeq:{{{2}}}|c|</code>|</tt>}}
  |nw={{#ifeq:{{{1}}}|c|<code>|<tt>}}{{#tag:nowiki|{{{3}}}}}{{#ifeq:{{{1}}}|c|</code>|</tt>}}
  |nw={{#ifeq:{{{1}}}|c|<code>|<tt>}}{{#tag:nowiki|{{{3}}}}}{{#ifeq:{{{1}}}|c|</code>|</tt>}}
Line 8: Line 8:
   |{{{1}}}
   |{{{1}}}
  }}
  }}
}}</span><noinclude>
}}</span></onlyinclude>
 
{{Documentation}}
 
<!-- Add categories to the /doc subpage and interwikis in Wikidata, not here! -->
----
Prevents wrapping of lines like {{tl|nowrap}} (redirect: {{tl|NW}}) plus the option to also apply &lt;tt>/&lt;code> tags or &lt;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 {{x|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 + &lt;code>
* {{tlc|NW2|tt|''text''}} - nowrap + &lt;tt>
* {{tlc|NW2|nw|''text''}} - nowrap + &lt;nowiki>
* {{tlc|NW2|c|nw|''text''}} - nowrap + &lt;code> + &lt;nowiki>
* {{tlc|NW2|nw|tt|''text''}} - nowrap + &lt;tt> + &lt;nowiki>
 
[[Category:Formatting templates|{{PAGENAME}}]]
</noinclude>
Cookies help us deliver our services. By using our services, you agree to our use of cookies.