Template:User other: Difference between revisions

Clarification
m (+rel: Template:Namespace detect)
(Clarification)
 
Line 22: Line 22:
  <nowiki>{{</nowiki>'''user other'''<nowiki>|</nowiki>''text if user''<nowiki>|</nowiki>''text if other'' <nowiki>|</nowiki>''demospace=''<nowiki>}}</nowiki>
  <nowiki>{{</nowiki>'''user other'''<nowiki>|</nowiki>''text if user''<nowiki>|</nowiki>''text if other'' <nowiki>|</nowiki>''demospace=''<nowiki>}}</nowiki>


;text if user:  Optional text to use if the template is on a page in the user namespace.
; text if user:  Optional text to use if the template is on a page in the user namespace.


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


; demospace:  Optional namespace override.  If it is empty or undefined the namespace of the page with the template on will be used, if it is '''user''' then '''text if user''' 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 not a user page {{user other|this text will not be shown|this text will be shown}}.</nowiki>
Since this is a template page {{user other|this text will ''not'' be shown|this text ''will'' be shown}}.
Since this is not a user page {{user other|this text will not be shown|this text will be shown}}.
</pre>
Since this is a template page {{user other|this text will ''not'' be shown|this text ''will'' be shown}}.


<pre>
<nowiki>However with {{user other|a little bit of cheating|this text will not be shown|demospace=user}}...</nowiki>
However with {{user other|a little bit of|some cheating|demospace=user}}...
However with {{user other|a little bit of cheating|this text will not be shown|demospace=user}}...
</pre>
However with {{user other|a little bit of|some cheating|demospace=user}}...


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


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