Template:Special: Difference between revisions

From the Croc Wiki, the Croc encyclopedia
Jump to navigationJump to search
Content added Content deleted
(s/Commons/{{ns:4}}/ for better portability (also fixed on Commons))
(import later added 4th example from Commons)
Line 7: Line 7:
* <code>{{tlx|Special|PrefixIndex{{!}}namespace{{!}}1{{!}}<nowiki>{{ns:1}}</nowiki>}}</code> yields {{Special|PrefixIndex|namespace|1|{{ns:1}}}}
* <code>{{tlx|Special|PrefixIndex{{!}}namespace{{!}}1{{!}}<nowiki>{{ns:1}}</nowiki>}}</code> yields {{Special|PrefixIndex|namespace|1|{{ns:1}}}}
* <code>{{tlx|Special|PrefixIndex{{!}}namespace{{!}}1}}</code> yields {{Special|PrefixIndex|namespace|1}}
* <code>{{tlx|Special|PrefixIndex{{!}}namespace{{!}}1}}</code> yields {{Special|PrefixIndex|namespace|1}}
* <code>{{tlx|Special|PrefixIndex/<nowiki>{{FULLPAGENAME}}</nowiki>/{{!}}stripprefix{{!}}1{{!}}subpages}}</code> yields {{Special|PrefixIndex/{{FULLPAGENAME}}/|stripprefix|1|subpages}}


Omitting <code>Name=Value</code> might '''apparently''' work, but actually this is not supported, e.g., <code>{{tlx|Special|Mypage}}</code> yields {{Special|Mypage}}.
Omitting <code>Name=Value</code> might '''apparently''' work, but actually this is not supported, e.g., <code>{{tlx|Special|Mypage}}</code> yields {{Special|Mypage}}.

Revision as of 23:34, December 2, 2014

{{Special|Page|Name|Value|Title}} creates a plain link for [{{fullurl:Special:Page|Name=Value}} Title].

The link has in essence the same effect as https://crocwiki.com/wiki/Special:Page?Name=Value.

The default for the optional Title is the localized name of the Page, i.e., {{PAGENAME:{{#special:Page}}}}.  Examples:

Omitting Name=Value might apparently work, but actually this is not supported, e.g., {{Special|Mypage}} yields MyPage.

You can use [[Special:Page|{{PAGENAME:{{#special:Page}}}}]] where Name=Value is not needed.  On Croc Wiki the localized name of Mypage is the default MyPage (note camel case), and you can simply write [[Special:Mypage|]].  If a template is also used on Wikis with localized names the longer form with {{PAGENAME:{{#special:Page}}}} might be better.