Template:Global
From NovaRoma
(Difference between revisions)
m (remv extra spaces) |
m (Protected "Template:Global" [edit=sysop:move=sysop]) |
||
(4 intermediate revisions by one user not shown) | |||
Line 1: | Line 1: | ||
− | + | {{#if: {{{1|}}} | {{#switch: {{NAMESPACE}} | DE | EO | ES |FR | HU | IT | LA | PT | RO | RU = {{#ifexist:{{NAMESPACE}}:{{{1}}}|[[{{NAMESPACE}}:{{{1}}}|{{#if: {{{2}}} |{{{2}}}|{{{1}}}}}]]| [[{{{1}}}|{{#if: {{{2}}} |{{{2}}}|{{{1}}}}}]]}}| [[{{{1}}}|{{#if: {{{2}}} |{{{2}}}|{{{1}}}}}]]}}|}}<noinclude>[[Category:Templates]] | |
==Purpose== | ==Purpose== | ||
− | This function will provide language-context sensitive links. In the LA, FR, DE, IT, ES, HU, PT, RO, RU 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. | + | This function will provide language-context sensitive links. In the LA, FR, DE, IT, ES, HU, PT, RO, EO, RU 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== | ==Scope== |
Latest revision as of 23:31, 11 November 2008
Purpose
This function will provide language-context sensitive links. In the LA, FR, DE, IT, ES, HU, PT, RO, EO, RU 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.
If no parameters are used, the return is empty. As a result, passing null values to Global will not result in an empty link or unlinked brackets appearing on a page.