Template:Relay: Difference between revisions
From FrathWiki
Jump to navigationJump to search
(made “previous” and “next” labels without links possible; added relay-name category) |
(fixed description; made {{{prevname}}} and {{{nextname}}} work for external links) |
||
Line 3: | Line 3: | ||
==Parameters== | ==Parameters== | ||
; <tt><nowiki>{{{link}}}</ | ; <tt><nowiki>{{{link}}}</nowiki></nowiki> | ||
: 1 if the relay's name should be a link (this is the default), 0 otherwise. | : 1 if the relay's name should be a link (this is the default), 0 otherwise. | ||
; <tt><nowiki>{{{next}}}</ | ; <tt><nowiki>{{{next}}}</nowiki></tt> | ||
: the next article{{ref|1|1}}. | : the next article{{ref|1|1}}. | ||
; <tt><nowiki>{{{nextext}}}</ | ; <tt><nowiki>{{{nextext}}}</nowiki></tt> | ||
: 1 if <tt><nowiki>{{{next}}}</ | : 1 if <tt><nowiki>{{{next}}}</nowiki></tt> is an external link, 0 if it is an article on this wiki (this is the default). | ||
; <tt><nowiki>{{{nextname}}}</ | ; <tt><nowiki>{{{nextname}}}</nowiki></tt> | ||
: how the link to the next article should be displayed. Defaults to <tt><nowiki>{{{next}}}</ | : how the link to the next article should be displayed. Defaults to <tt><nowiki>{{{next}}}</nowiki></tt>. | ||
; <tt><nowiki>{{{prev}}}</ | ; <tt><nowiki>{{{prev}}}</nowiki></tt> | ||
: the previous article{{ref|1|1}}. | : the previous article{{ref|1|1}}. | ||
; <tt><nowiki>{{{prevext}}}</ | ; <tt><nowiki>{{{prevext}}}</nowiki></tt> | ||
: 1 if {{{prev}}} is an external link, 0 if it is an article on this wiki (this is the default). | : 1 if <tt><nowiki>{{{prev}}}</nowiki></tt> is an external link, 0 if it is an article on this wiki (this is the default). | ||
; <tt><nowiki>{{{prevname}}}</ | ; <tt><nowiki>{{{prevname}}}</nowiki></tt> | ||
: how the link to the previous article should be displayed. Defaults to <tt><nowiki>{{{prev}}}</ | : how the link to the previous article should be displayed. Defaults to <tt><nowiki>{{{prev}}}</nowiki></tt>. | ||
; <tt><nowiki>{{{relay}}}</ | ; <tt><nowiki>{{{relay}}}</nowiki></tt> | ||
: the relay's name. This should be the name of the relay's page on this wiki. If the relay does not have a page on this wiki, you should specify this anyway and set <tt><nowiki>{{{link}}}</ | : the relay's name. This should be the name of the relay's page on this wiki. If the relay does not have a page on this wiki, you should specify this anyway and set <tt><nowiki>{{{link}}}</nowiki></tt> to 0. If the page is not relevant to a specific relay, do not specify this — the template will default to [[Conlang relay]]. | ||
{{note|1|1}}These two parameters are optional. If specified, they should be the name of a page on this wiki (if they are external links, you must set '''prevext''' and/or '''nextext''') and will be shown as a link to the left of the title. You can use this on the page of a torch to link to the previous torch. | {{note|1|1}}These two parameters are optional. If specified, they should be the name of a page on this wiki (if they are external links, you must set '''prevext''' and/or '''nextext''') and will be shown as a link to the left of the title. You can use this on the page of a torch to link to the previous torch. | ||
Line 32: | Line 32: | ||
[[Category:Templates]] | [[Category:Templates]] | ||
</noinclude><table style="width: 100%; border: 1px solid #5F79CC; background-color: #BEF1FF; color: black"><tr>{{ #ifeq: {{{prev|}}}||{{#if:{{{prevname|}}}|<th style="border-bottom: 1px solid #5F79CC">{{{prevname}}}</th>}}|<th style="border-bottom: 1px solid #5F79CC">{{#ifexpr:{{{prevext|0}}}|[{{{prev}}} ← {{{prev}}}]|[[{{{prev}}}|← {{{prevname|{{{prev}}}}}}]]}}</th>}}<th colspan="{{#expr:1+{{#ifeq:{{{prev|}}}||1|0}}+{{#ifeq:{{{next|}}}||1|0}}}}" style="border-bottom: 1px solid #5F79CC">{{#ifexpr:{{{link|1}}}|[[{{{relay|Conlang relay}}}]]|{{{relay|Conlang relay}}}}}</th>{{#ifeq: {{{next|}}}||{{#if:{{{nextname|}}}|<th style="border-bottom: 1px solid #5F79CC">{{{nextname}}}</th>}}|<th style="border-bottom: 1px solid #5F79CC">{{#ifexpr:{{{nextext|0}}}|[{{{next}}} {{{next}}} →]|[[{{{next}}}|{{{nextname|{{{next}}}}}} →]]}}</th>}}</tr>{{#ifexist:{{{relay|Conlang relay}}}/TOC|<tr><td colspan="3">{{{{#ifeq:{{NAMESPACE:{{{relay|Conlang relay}}}}}||:}}{{{relay|Conlang relay}}}/TOC}}</td></tr><tr><td colspan="3" style="border-top: 1px solid #5F79CC; text-align: center">|<tr><td colspan="3" style="text-align: center">}}[[Conlang relay|What is a relay?]] • [[Conlang relay/TOC|list of relays]] • [[:Category:Conlang relays|all pages in this category]] {{ #ifeq: {{FULLPAGENAME}} | Category:Conlang relays || [[Category:Conlang relays]] {{ #if: {{{relay|}}}| [[Category:{{{relay}}}]] }}}}</td></tr></table> | </noinclude><table style="width: 100%; border: 1px solid #5F79CC; background-color: #BEF1FF; color: black"><tr>{{ #ifeq: {{{prev|}}}||{{#if:{{{prevname|}}}|<th style="border-bottom: 1px solid #5F79CC">{{{prevname}}}</th>}}|<th style="border-bottom: 1px solid #5F79CC">{{#ifexpr:{{{prevext|0}}}|[{{{prev}}} ← {{{prevname|{{{prev}}}}}}]|[[{{{prev}}}|← {{{prevname|{{{prev}}}}}}]]}}</th>}}<th colspan="{{#expr:1+{{#ifeq:{{{prev|}}}||1|0}}+{{#ifeq:{{{next|}}}||1|0}}}}" style="border-bottom: 1px solid #5F79CC">{{#ifexpr:{{{link|1}}}|[[{{{relay|Conlang relay}}}]]|{{{relay|Conlang relay}}}}}</th>{{#ifeq: {{{next|}}}||{{#if:{{{nextname|}}}|<th style="border-bottom: 1px solid #5F79CC">{{{nextname}}}</th>}}|<th style="border-bottom: 1px solid #5F79CC">{{#ifexpr:{{{nextext|0}}}|[{{{next}}} {{{nextname|{{{next}}}}}} →]|[[{{{next}}}|{{{nextname|{{{next}}}}}} →]]}}</th>}}</tr>{{#ifexist:{{{relay|Conlang relay}}}/TOC|<tr><td colspan="3">{{{{#ifeq:{{NAMESPACE:{{{relay|Conlang relay}}}}}||:}}{{{relay|Conlang relay}}}/TOC}}</td></tr><tr><td colspan="3" style="border-top: 1px solid #5F79CC; text-align: center">|<tr><td colspan="3" style="text-align: center">}}[[Conlang relay|What is a relay?]] • [[Conlang relay/TOC|list of relays]] • [[:Category:Conlang relays|all pages in this category]] {{ #ifeq: {{FULLPAGENAME}} | Category:Conlang relays || [[Category:Conlang relays]] {{ #if: {{{relay|}}}| [[Category:{{{relay}}}]] }}}}</td></tr></table> |
Revision as of 06:14, 11 August 2012
A navigation footer for pages related to conlang relays (including torches), including the appropriate category.
Parameters
- {{{link}}}</nowiki>
- 1 if the relay's name should be a link (this is the default), 0 otherwise.
- {{{next}}}
- the next article1.
- {{{nextext}}}
- 1 if {{{next}}} is an external link, 0 if it is an article on this wiki (this is the default).
- {{{nextname}}}
- how the link to the next article should be displayed. Defaults to {{{next}}}.
- {{{prev}}}
- the previous article1.
- {{{prevext}}}
- 1 if {{{prev}}} is an external link, 0 if it is an article on this wiki (this is the default).
- {{{prevname}}}
- how the link to the previous article should be displayed. Defaults to {{{prev}}}.
- {{{relay}}}
- the relay's name. This should be the name of the relay's page on this wiki. If the relay does not have a page on this wiki, you should specify this anyway and set {{{link}}} to 0. If the page is not relevant to a specific relay, do not specify this — the template will default to Conlang relay.
^1 These two parameters are optional. If specified, they should be the name of a page on this wiki (if they are external links, you must set prevext and/or nextext) and will be shown as a link to the left of the title. You can use this on the page of a torch to link to the previous torch.
Table of contents
You can add a table of contents to this navbox by creating the subpage /TOC of the page you specified under the relay parameter.
Example
This is how the template looks without any parameters:
Conlang relay | ||
---|---|---|
What is a relay? • list of relays • all pages in this category |