User:Bugman/Howto other: Difference between revisions

From FlightGear wiki
Jump to navigation Jump to search
(Copy of {{Howto other}}, for testing.)
 
(Capitalisation testing.)
Line 4: Line 4:
   | {{lc: {{{demospace}}} }}    <!--Use lower case "demospace"-->
   | {{lc: {{{demospace}}} }}    <!--Use lower case "demospace"-->
   | {{#ifeq:{{NAMESPACE}}|{{ns:0}}
   | {{#ifeq:{{NAMESPACE}}|{{ns:0}}
     | howto
     | Howto
     | other
     | Other
     }}  
     }}  
   }}
   }}
| howto     = {{{1|}}}
| Howto     = {{{1|}}}
| other
| Other
| #default = {{{2|}}}
| #default = {{{2|}}}
}}<noinclude>
}}<noinclude>

Revision as of 09:48, 11 September 2020


The following template description is not displayed when the template is inserted in an article.

Goal

This template can be used to show a different text if it is not used on a page in the howto namespace. It can also be used for category suppression, to avoid that a page is categorized if it is not in the howto namespace

If more than one namespace need to be handled, use {{namespace detect}}.

Usage

{{howto other|text if howto|text if other |demospace=}}

All parameters are optional.

text if howto
Text to use if the template is on a page in the howto namespace.
text if other
Text 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

Text selection

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 this text will be shown.

However with {{howto other|a little bit of|some cheating|demospace=howto}}...

However with a little bit of...

Category suppression

Using the template like this will only categorize a page when it is in the main article space:

{{howto other|[[Category:Howto]]}}

Related templates