Template:Suite/doc: Difference between revisions

From MediaWiki
Jump to navigationJump to search
Derik (talk | contribs)
New page: '''<tt><nowiki>{{suite}}</nowiki></tt>''' is a template which creates a quicknav for an article "suite"; usually one article which has been broken into many pieces for length. Add '''<tt>...
 
Derik (talk | contribs)
No edit summary
Line 2: Line 2:


Add '''<tt><nowiki>{{suite}}</nowiki></tt>''' to the top of each page with the article names in a list.
Add '''<tt><nowiki>{{suite}}</nowiki></tt>''' to the top of each page with the article names in a list.
 
{{suite|content=* [[Optimus Prime (G1)]]
* [[Optimus Prime (G1)/toys]]
}}
<pre>{{suite|content=* [[Optimus Prime (G1)]]
<pre>{{suite|content=* [[Optimus Prime (G1)]]
* [[Optimus Prime (G1)/toys]]
* [[Optimus Prime (G1)/toys]]
Line 8: Line 10:


When '''<tt><nowiki>{{suite}}</nowiki></tt>''' is used after a ''disambig'' tag, it will automatically switch to a truncated form and 'hug' the template above.  (Occupying the empty space to the right of the continuity note without pushing article content down.)
When '''<tt><nowiki>{{suite}}</nowiki></tt>''' is used after a ''disambig'' tag, it will automatically switch to a truncated form and 'hug' the template above.  (Occupying the empty space to the right of the continuity note without pushing article content down.)
==<nowiki>{{subsuite}}</nowiki>==
If a page is broken has been broken into ''many pieces'' (such as [[Optimus Prime (G1)]]) it may be preferable to create a single sub-page with the suite contents rather than updating it on all the pages my hand.  Create a page such as [[Optimus Prime (G1)/suite]], and include the template as described above '''making sure''' to use the template '''<tt><nowiki>{{subsuite}}</nowiki></tt>''' instead.
You can then add the bare tag '''<tt><nowiki>{{suite}}</nowiki></tt>''' with ''no'' parameters and the "/suite" subpage will be automatically included.
{{note|The automatic inclusion checks for the existence of a "/suite" page, and it's not found moves one level 'up' the chain.  As a result a page such as "Optimus Prime (G1)/Machine Wars/toys" would break this function because it would need to go up ''two'' levels.  Since at this time no page on the wiki uses such a format... the [[User:Derik|template author]] doesn't really care, but he'll add another layer of checks if it ever becomes an issue.}}
==Technical notes==
* [[Template: Subsuite]] is a redirect to [[Template: Suite]] to avoid recursion errors.


<noinclude>[[Category: Externalized documentation]]</noinclude>
<noinclude>[[Category: Externalized documentation]]</noinclude>

Revision as of 03:01, 21 August 2009

{{suite}} is a template which creates a quicknav for an article "suite"; usually one article which has been broken into many pieces for length.

Add {{suite}} to the top of each page with the article names in a list.

{{suite|content=* [[Optimus Prime (G1)]]
* [[Optimus Prime (G1)/toys]]
}}

When {{suite}} is used after a disambig tag, it will automatically switch to a truncated form and 'hug' the template above. (Occupying the empty space to the right of the continuity note without pushing article content down.)

{{subsuite}}

If a page is broken has been broken into many pieces (such as Optimus Prime (G1)) it may be preferable to create a single sub-page with the suite contents rather than updating it on all the pages my hand. Create a page such as Optimus Prime (G1)/suite, and include the template as described above making sure to use the template {{subsuite}} instead.

You can then add the bare tag {{suite}} with no parameters and the "/suite" subpage will be automatically included.

The automatic inclusion checks for the existence of a "/suite" page, and it's not found moves one level 'up' the chain. As a result a page such as "Optimus Prime (G1)/Machine Wars/toys" would break this function because it would need to go up two levels. Since at this time no page on the wiki uses such a format... the template author doesn't really care, but he'll add another layer of checks if it ever becomes an issue.

Technical notes