Template:Index-page: Difference between revisions

From The DarkMod Wiki
Jump to navigationJump to search
m (fix thinko and rem space at top)
(more nice text)
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
<noinclude>
<noinclude>
{{template-help|name=index-page|sort=Index page|where=top}}
This template sorts adds an infobox with a text explaning that this an index or overview page for
a certain topic.


The parameter '''category''' sets the name and link of the category that is linked inside the infobox.
=== Usage ===
 
Include this template at the top of index pages like so:
 
<nowiki>{{index-page|category=Editing|topic=elevators}}</nowiki>
 
=== Parameters ===
 
==== sort ====
 
The optional '''sort''' parameter for this template influences the place where the
article will be sorted in the category:
 
{|border=1 cellspacing=0 cellpadding=3
 
|-
!bgcolor=#ffdead|Example
!bgcolor=#ffdead|Description
 
|-
|<nowiki>{{index-page|...}}</nowiki>
|default sorting order based on article name
 
|-
|<nowiki>{{index-page|...|sort=Lifts}}</nowiki>
|an article named "Creating a Lift" goes under "L" (specifically "Lifts")
 
|}
 
==== category ====
 
The required '''category''' parameter for this template influences the category to which the info box links:
 
{|border=1 cellspacing=0 cellpadding=3
 
|-
!bgcolor=#ffdead|Example
!bgcolor=#ffdead|Description
 
|-
|<nowiki>{{index-page|category=Editing}}</nowiki>
|Link to [[:Category:Editing]]
 
|}
 
==== topic ====
 
The required '''topic''' parameter sets the text that will be inserted into the info box after the word '''about''':
 
{|border=1 cellspacing=0 cellpadding=3
 
|-
!bgcolor=#ffdead|Example
!bgcolor=#ffdead|Description
 
|-
|<nowiki>{{index-page|topic=textures}}</nowiki>
|Creates: "This is a selected list of articles and tutorials about '''textures'''."
 
|}
 
[[Category:Templates|{{{sort}}}]]
</noinclude><includeonly>
</noinclude><includeonly>
{{infobox|bg=#e0e0ff|text=This is an manually generated index page. The information here might be '''out-of-date''' or '''incorrect'''.
{{infobox|bg=#e0e0ff|text=This is a selected list of articles and tutorials about '''{{{topic|Topic parameter not set!}}}'''.
<br>Please see the appropriate '''[[:Category:{{{category|undef!}}}|{{{category|Category parameter not set!}}}]]''' category for a full list of articles for this topic.}}
<br>Please see the category '''[[:Category:{{{category|undef!}}}|{{{category|Category parameter not set!}}}]]''' for a full list of articles for this topic.}}
[[Category:Index pages|{{{sort|{{PAGENAME}}}}}]]
[[Category:Index pages|{{{sort|{{PAGENAME}}}}}]]
</includeonly>
</includeonly>

Revision as of 23:00, 5 November 2007

This template sorts adds an infobox with a text explaning that this an index or overview page for a certain topic.

Usage

Include this template at the top of index pages like so:

{{index-page|category=Editing|topic=elevators}}

Parameters

sort

The optional sort parameter for this template influences the place where the article will be sorted in the category:

Example Description
{{index-page|...}} default sorting order based on article name
{{index-page|...|sort=Lifts}} an article named "Creating a Lift" goes under "L" (specifically "Lifts")

category

The required category parameter for this template influences the category to which the info box links:

Example Description
{{index-page|category=Editing}} Link to Category:Editing

topic

The required topic parameter sets the text that will be inserted into the info box after the word about:

Example Description
{{index-page|topic=textures}} Creates: "This is a selected list of articles and tutorials about textures."