Template:Navigation: Difference between revisions
Content added Content deleted
imported>FrozenPlum (Add a navigation example template) |
imported>FrozenPlum mNo edit summary |
||
(One intermediate revision by the same user not shown) | |||
Line 1: | Line 1: | ||
⚫ | <noinclude>This template formats a navigation bar of previous and next page in a given category and places it inside a 3 column table. It uses the {{t|previous}} and {{t|next}} templates to create the previous/next buttons, based on the '''name''' of a given category '''without the namespace'''. When placed on a page in Category:Fruit examples, it uses the <code><nowiki>{{PAGENAME}}</nowiki></code> [[mw:Help:Magic words|magic word]], to fetch previous and next pages to the page it is placed on. |
||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
|style="width:20%; text-align:center;"|[[:Category:{{{category|}}}|{{{category|}}}]] |
|style="width:20%; text-align:center;"|[[:Category:{{{category|}}}|{{{category|}}}]] |
||
|style="width:40%;"|{{ |
|style="width:40%;"|{{next|category={{{category|}}}}} |
||
|}</includeonly><noinclude> |
|}</includeonly><noinclude> |
||
Line 10: | Line 12: | ||
{{navigation|category=Fruit examples}} |
{{navigation|category=Fruit examples}} |
||
== |
==See also== |
||
* [[Template:Previous]] |
|||
⚫ | This template formats a navigation bar of previous and next page in a given category and places it inside a 3 column table. It uses the {{t| |
||
* [[Template:Next]] |
|||
[[Category:Example templates]] |
[[Category:Example templates]] |
||
</noinclude> |
</noinclude> |
Latest revision as of 22:49, 1 October 2022
This template formats a navigation bar of previous and next page in a given category and places it inside a 3 column table. It uses the {{previous}} and {{next}} templates to create the previous/next buttons, based on the name of a given category without the namespace. When placed on a page in Category:Fruit examples, it uses the {{PAGENAME}}
magic word, to fetch previous and next pages to the page it is placed on.
Example
{{navigation|category=Fruit examples}}
Result:
{{#dpl: | debug=0 | category=Fruit examples | notcategory= | namespace=Main | titlelt=Navigation | mode=inline | ordermethod=title | order=descending | count=1 | format=,,
}} |
Fruit examples | {{#dpl: | debug=0 | category=Fruit examples | notcategory= | namespace=Main | titlegt=Navigation | mode=inline | ordermethod=title | order=ascending | count=1 | format=,,
}} |