Template:Global
From NovaRoma
(Difference between revisions)
(conditionally use secondary link text) |
(documentation) |
||
| Line 1: | Line 1: | ||
| − | < | + | <includeonly>{{#switch: {{NAMESPACE}} | LA | FR | DE | IT | ES | PT = [[{{NAMESPACE}}:{{{1}}} |{{#if: {{{2}}} | {{{2}}} | {{{1}}} }}]] | [[{{{1}}}|{{#if: {{{2}}} | {{{2}}} | {{{1}}} }}]] }}</includeonly> <noinclude>[[Category:Templates]]</noinclude> |
| + | |||
| + | ==Purpose== | ||
| + | |||
| + | This function will provide language-context sensitive links. In the LA, FR, DE, IT, ES, PT namespaces, links will remain within the namespace. In all other namespaces, links will point to the default namespace. Given a target, the function will return a link. | ||
| + | |||
| + | ==Scope== | ||
| + | |||
| + | This template will generally be used to globalize other templates. There is no point to using it in articles directly. | ||
| + | |||
| + | ==Usage== | ||
| + | |||
| + | <nowiki>{{Global|Target|Optional link text}}</nowiki> | ||
| + | |||
| + | "Target" is the name of the target page. | ||
| + | |||
| + | "Optional link text" is the text that will appear on the page as link text. If blank, "Target" will be used. | ||
Revision as of 02:39, 28 December 2007
Purpose
This function will provide language-context sensitive links. In the LA, FR, DE, IT, ES, PT namespaces, links will remain within the namespace. In all other namespaces, links will point to the default namespace. Given a target, the function will return a link.
Scope
This template will generally be used to globalize other templates. There is no point to using it in articles directly.
Usage
{{Global|Target|Optional link text}}
"Target" is the name of the target page.
"Optional link text" is the text that will appear on the page as link text. If blank, "Target" will be used.