Template:Howto other: Difference between revisions

Jump to navigation Jump to search
m
Slight clarification
(Created page with "{{#switch: <!--If no or empty "demospace" parameter then detect namespace--> {{#if:{{{demospace|}}} | {{lc: {{{demospace}}} }} <!--Use lower case "demospace"--> | ...")
 
m (Slight clarification)
Line 22: Line 22:
  <nowiki>{{</nowiki>'''howto other'''<nowiki>|</nowiki>''text if howto''<nowiki>|</nowiki>''text if other'' <nowiki>|</nowiki>''demospace=''<nowiki>}}</nowiki>
  <nowiki>{{</nowiki>'''howto other'''<nowiki>|</nowiki>''text if howto''<nowiki>|</nowiki>''text if other'' <nowiki>|</nowiki>''demospace=''<nowiki>}}</nowiki>


;text if howto:  Optional text to use if the template is on a page in the howto namespace.
All parameters are optional.


;text if otherOptional text to use if the template is on a page in any other namespace.
;text if howtoText to use if the template is on a page in the howto namespace.


;demospaceOptional namespace override.  If it is empty or undefined the namespace of the page with the template on will be used, if it is '''howto''' then '''text if howto''' will be shown and if it is '''other''' or any other namespace then '''text if other''' will be used.
;text if otherText to use if the template is on a page in any other namespace.


;demospace:  Namespace override.  If it is empty or undefined the namespace of the page with the template on will be used, if it is '''howto''' then '''text if howto''' will be shown and if it is '''other''' or any other namespace then '''text if other''' will be used.


== Examples ==
== Examples ==
=== Text selection ===
=== Text selection ===
<pre>
<nowiki>Since this is a template page {{howto other|this text will ''not'' be shown|this text ''will'' be shown}}.</nowiki>
Since this is a template page {{howto other|this text will ''not'' be shown|this text ''will'' be shown}}.
</pre>
Since this is a template page {{howto other|this text will ''not'' be shown|this text ''will'' be shown}}.
Since this is a template page {{howto other|this text will ''not'' be shown|this text ''will'' be shown}}.


<pre>
<nowiki>However with {{howto other|a little bit of|some cheating|demospace=howto}}...</nowiki>
However with {{howto other|a little bit of|some cheating|demospace=howto}}...
</pre>
However with {{howto other|a little bit of|some cheating|demospace=howto}}...
However with {{howto other|a little bit of|some cheating|demospace=howto}}...


=== Category suppression ===
=== Category suppression ===
Using the template like this will only categorize a page when it is in the main article space:
Using the template like this will only categorize a page when it is in the main article space:
<pre>
<nowiki>{{howto other|[[Category:Howto]]}}</nowiki>
{{howto other|[[Category:Howto]]}}
</pre>


== Related templates ==
== Related templates ==

Navigation menu