Template:Mbox-com-usage

From TrainzOnline
(Difference between revisions)
Jump to: navigation, search
(genesis)
 
(fix cat)
 
Line 15: Line 15:
 
# <tt>{{tl|ORP-end}} - <nowiki> {{ORP-end}}</nowiki> on [[KIND Engine]]</tt> ''will not categorize the page at all''. ORP-end does not auto-categorize, unless given an explicit category (would normally be a sub-category) by <code><nowiki> {{ORP-end|cat=category-name}}</nowiki></code>  
 
# <tt>{{tl|ORP-end}} - <nowiki> {{ORP-end}}</nowiki> on [[KIND Engine]]</tt> ''will not categorize the page at all''. ORP-end does not auto-categorize, unless given an explicit category (would normally be a sub-category) by <code><nowiki> {{ORP-end|cat=category-name}}</nowiki></code>  
 
## so... <tt><nowiki> {{ORP-end|Engine}}</nowiki> on [[KIND Engine]]</tt> will alphabetize the article under ''''E'''', if and only if cat=category-name is also defined. In the given example, Engine has no effect, so the same result as case 2.
 
## so... <tt><nowiki> {{ORP-end|Engine}}</nowiki> on [[KIND Engine]]</tt> will alphabetize the article under ''''E'''', if and only if cat=category-name is also defined. In the given example, Engine has no effect, so the same result as case 2.
## and, <tt><nowiki> {{ORP-end|cat=category-name|Engine}}</nowiki> on [[KIND Engine]]</tt> will alphabetize the article under '''E''', just as a normal <nowiki>[[category:category-name|Engine]]</nowiki> call would do.
+
## and, <tt><nowiki> {{ORP-end|cat=category-name|Engine}}</nowiki> on [[KIND Engine]]</tt> will alphabetize the article under '''E''', just as a normal <nowiki>[[category:category-name|Engine]]</nowiki> call would do.<includeonly>
[[Category:Template documentation pages|{{PAGENAME}}]]<includeonly>
+
 
[[Category:mbox templates|{{PAGENAME}}]]
 
[[Category:mbox templates|{{PAGENAME}}]]
  
Line 22: Line 21:
  
 
[[Category:Self-documenting templates|{{PAGENAME}}]]</includeonly><noinclude>
 
[[Category:Self-documenting templates|{{PAGENAME}}]]</includeonly><noinclude>
 +
[[Category:Template documentation pages|{{PAGENAME}}]]
 
&nbsp;
 
&nbsp;
 
</div>
 
</div>
 
</noinclude>
 
</noinclude>

Latest revision as of 18:00, 16 July 2013

This is common usage for the various -bot suffixed templates listed in Category:mbox templates.
These templates are auto-categorizing templates that also close out page formatting. Their categories differ, so matching header templates to bottom templates is important unless categorizing a page to a sub-category, in which event, the common {{ORP-end}} template can be used below to introduce a specific sub-categorization.

The behavior of this page is to product the below message, and provide common auto-categorization for the templates which use this usage:

  • It can be given the {{{1}}} default parameter (same as setting the explicit parameter call: |1=something) to alter the sort order of the reference page as listed in that category.

Example based on {{ORP-bot}}: (the coding is identical but for the auto-category, use {{ORP-end}} for any page '-bot' mbox template pair where a sub-categorization is needed.)

  1. {{ORP-end|ABC}} will list the page under the A pages, before any page 'Aeroplane' but after 'Aardvark'.

category, just like {{ORP-bot}}.

  • Sorting Difference: {{ORP-bot|ABC}} will list the page under the A pages, before any page 'Aeroplane' but after 'Aardvark'.
  • This is called a pipetrick, and it applies to all category listings, and especially to all '-bot' templates listed in Category:mbox templates.

Contrasting Examples:

  1. {{ORP-bot}} - {{ORP-bot}} on KIND Engine will alphabetize the article under 'K', just as a normal [[category:Trainz reference pages]] would do.
  2. {{ORP-end}} - {{ORP-end}} on KIND Engine will not categorize the page at all. ORP-end does not auto-categorize, unless given an explicit category (would normally be a sub-category) by {{ORP-end|cat=category-name}}
    1. so... {{ORP-end|Engine}} on KIND Engine will alphabetize the article under 'E', if and only if cat=category-name is also defined. In the given example, Engine has no effect, so the same result as case 2.
    2. and, {{ORP-end|cat=category-name|Engine}} on KIND Engine will alphabetize the article under E, just as a normal [[category:category-name|Engine]] call would do.

 

Personal tools