Template:Special: Difference between revisions

From the Croc Wiki, the Croc encyclopedia
Jump to navigationJump to search
Content added Content deleted
m (null edit)
m (Text replacement - "\[\[Category:([^|]+)\|{{PAGENAME}}\]\]" to "Category:$1")
 
(12 intermediate revisions by 2 users not shown)
Line 1: Line 1:
<includeonly><span class="plainlinks">[{{fullurl:Special:{{{1}}}|{{{2}}}={{{3}}}}} {{{4|{{PAGENAME:{{#special:{{{1}}}}}}}}}}]</span></includeonly><noinclude><code>{{tlx|Special|Page|Name|Value|Title}}</code> creates a plain link for <code><nowiki>[{{fullurl:Special:Page|Name=Value}} Title]</nowiki></code>.{{-}}
<includeonly><span class="plainlinks">[{{fullurl:Special:{{{1}}}|{{{2}}}={{{3}}}}} {{{4|{{PAGENAME:{{#special:{{{1}}}}}}}}}}]</span></includeonly><noinclude><code>{{tlx|Special|Page|Name|Value|Title}}</code> creates a plain link for <code><nowiki>[{{fullurl:Special:Page|Name=Value}} Title]</nowiki></code>.{{-}}
The link has in essence the same effect as <code><span class="plainlinksneverexpand">{{SERVER}}/wiki/Special:Page?Name=Value</span></code>.
The link has in essence the same effect as <code>[<span class="plainlinks">https:{{SERVER}}/wiki/Special:Page?Name=Value</span> Title]</code>.


The default for the optional <code>Title</code> is the localized name of the <code>Page</code>, i.e., <code><nowiki>{{PAGENAME:{{#special:Page}}}}</nowiki></code>.&nbsp; Examples:
The default for the optional <code>Title</code> is the localized name of the <code>Page</code>, i.e., <code><nowiki>{{PAGENAME:{{#special:Page}}}}</nowiki></code>.&nbsp; Examples:


* <code>{{tlx|Special|PrefixIndex{{!}}namespace{{!}}1{{!}}Talk}}</code> yields {{Special|PrefixIndex|namespace|1|Talk}}
* <code>{{tlx|Special|PrefixIndex{{!}}namespace{{!}}1{{!}}Talk}}</code> yields {{Special|PrefixIndex|namespace|1|Talk}}
* <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>{{FULLPAGENAMEE}}</nowiki>/{{!}}stripprefix{{!}}1{{!}}subpages}}</code> yields {{Special|PrefixIndex/{{FULLPAGENAMEE}}/|stripprefix|1|subpages}}
* <code>{{tlx|Special|Log{{!}}user{{!}}3&#x3D;WMFOffice&amp;amp;type&#x3D;rights{{!}}4&#x3D;official}}</code> yields {{Special|Log|user|3=WMFOffice&amp;type=rights|4=official}}


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}}.


You can use <code><nowiki>[[Special:Page|{{PAGENAME:{{#special:Page}}}}]]</nowiki></code> where <code>Name=Value</code> is not needed.&nbsp; On [[Project:About|Commons]] the localized name of [[Special:Mypage|Mypage]] is the default <code>{{PAGENAME:{{#special:Mypage}}}}</code> (note camel case), and you can simply write <code><nowiki>[[Special:Mypage|]]</nowiki></code>.&nbsp; If a template is also used on Wikis with localized names the longer form with <code>[[mw:Help:Magic_words#Miscellaneous|<nowiki>{{PAGENAME:{{#special:Page}}}}</nowiki>]]</code> might be better.
You can use <code><nowiki>[[Special:Page|{{PAGENAME:{{#special:Page}}}}]]</nowiki></code> where <code>Name=Value</code> is not needed.&nbsp; On [[Project:About|{{ns:4}}]] the localized name of [[Special:Mypage|Mypage]] is the default <code>{{PAGENAME:{{#special:Mypage}}}}</code> (note camel case), and you can simply write <code><nowiki>[[Special:Mypage|]]</nowiki></code>.&nbsp; If a template is also used on Wikis with localized names the longer form with <code>[[mw:Help:Magic_words#Miscellaneous|<nowiki>{{PAGENAME:{{#special:Page}}}}</nowiki>]]</code> might be better.&nbsp; <small style="white-space:nowrap">Also see [[c:Template:Special|c:]], [[d:Template:Special|d:]], [[mw:Template:Special|mw:]], [[w:de:Template:Special|w:de:]], [[w:en:Template:Special|w:en:]].</small>
----

<templatedata>
[[Category:Internal link templates|{{PAGENAME}}]]</noinclude>
{ "description": "Plain link to a special page with one parameter",
"params":
{ "1":
{ "label": "page",
"description": "page part of local Special:page",
"type": "wiki-page-name",
"required": true
},
"2":
{ "label": "name",
"description": "special page parameter name",
"type": "string",
"required": true
},
"3":
{ "label": "value",
"description": "special page parameter value",
"type": "string",
"required": true
},
"4":
{ "label": "title",
"description": "link display text",
"type": "string",
"default": "{{PAGENAME:{{#special:Page}}}}"
} } }</templatedata>[[Category:Internal link templates]]</noinclude>

Latest revision as of 16:22, July 15, 2022

{{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:https://crocwiki.com/wiki/Special:Page?Name=Value Title].

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.  Also see c:, d:, mw:, w:de:, w:en:.


Plain link to a special page with one parameter

Template parameters[Edit template data]

ParameterDescriptionTypeStatus
page1

page part of local Special:page

Page namerequired
name2

special page parameter name

Stringrequired
value3

special page parameter value

Stringrequired
title4

link display text

Default
{{PAGENAME:{{#special:Page}}}}
Stringoptional