Template:Template link general: Difference between revisions

From Mariopedia, a wiki on Mario, Yoshi, Wario, Donkey Kong, Super Smash Bros., and more!
Jump to navigationJump to search
Content added Content deleted
(usage without first parameter wasn't possible on pages in the template namespace (+simplification))
m (43 revisions imported from wikipedia:Template:Template_link_general)
 
(22 intermediate revisions by 13 users not shown)
Line 1: Line 1:
{{{{{|safesubst:}}}#Invoke:Template link general|main}}<noinclude>
<includeonly><!--
Templates tlc, tld, tlf have the following wrapping everything; do we need it?
<span style="white-space:nowrap;">
--><!--

-- begin tt style if tt=yes or code=yes given
-->{{#if:{{{tt|}}}{{{code|}}}|<code>}}<!--
-- opening brace unless braceinside=yes
-->{{#if:{{{braceinside|}}}||<nowiki>{{</nowiki>}}<!--
-- add subst prefix, if subst=yes given
-->{{#if:{{{subst|}}}|[[Help:Substitution|subst]]:}}<!--
-- begin boldface if bold=yes given
-->{{#if:{{{bold|}}}|'''}}<!--

-- create actual link (if not nolink=yes)
-->{{#if:{{{nolink|}}}
|<!-- nolink=yes -->
|{{!(}}{{!(}}:<!-- opening brackets of link
-->{{#ifeq:{{padleft:|1|{{{1}}}}} <!-- check whether we have a colon at the beginning -->
|:
|{{FULLPAGENAME:{{{1}}}}} <!-- if yes: link to article ns or assume other valid link, e.g. Interwikilink -->
|{{#switch:{{NAMESPACE:{{{1|{{FULLPAGENAME}}}}}}}
|{{ns:0}}={{ns:10}}:{{PAGENAME:{{{1|{{PAGENAME}}}}}}} <!-- No ns given: we want to link to template ns -->
|#default={{FULLPAGENAME:{{{1|{{FULLPAGENAME}}}}}}}<!--
-->}}<!--
-->}}{{!}}<!-- <<--- pipe character in link
-->}}<!--

-- create link text
-- opening brace if braceinside=yes
-->{{#if:{{{braceinside|}}}|<nowiki>{{</nowiki>}}<!--
-- surface text of link
-->{{{alttext|{{{1|{{#ifeq:{{NAMESPACE}}|{{ns:Template}}|{{PAGENAME}}|{{FULLPAGENAME}}}}}}}}}}<!--
-- closing brace if braceinside=yes
-->{{#if:{{{braceinside|}}}|<nowiki>}}</nowiki>}}<!--
-- end of link, unless nolink=yes
-->{{#if:{{{nolink|}}}||]]}}<!--

-- end boldface if bold=yes given
-->{{#if:{{{bold|}}}|'''}}<!--
-- begin italic style if italic=yes given
-->{{#if:{{{italic|}}}|<span style="font-style: italic;">}}<!--

-- add parameters
-->{{#ifeq:{{{2|}}}|{{{2|x}}}|&#124;{{{2}}}}}<!--
-->{{#ifeq:{{{3|}}}|{{{3|x}}}|&#124;{{{3}}}}}<!--
-->{{#ifeq:{{{4|}}}|{{{4|x}}}|&#124;{{{4}}}}}<!--
-->{{#ifeq:{{{5|}}}|{{{5|x}}}|&#124;{{{5}}}}}<!--
-->{{#ifeq:{{{6|}}}|{{{6|x}}}|&#124;{{{6}}}}}<!--
-->{{#ifeq:{{{7|}}}|{{{7|x}}}|&#124;{{{7}}}}}<!--
-->{{#ifeq:{{{8|}}}|{{{8|x}}}|&#124;{{{8}}}}}<!--
-->{{#ifeq:{{{9|}}}|{{{9|x}}}|&#124;{{{9}}}}}<!--
-->{{#ifeq:{{{10|}}}|{{{10|x}}}|&#124;{{{10}}}}}<!--
-->{{#ifeq:{{{11|}}}|{{{11|x}}}|&#124;{{{11}}}}}<!--
-->{{#if:{{{12|}}}|&#124;''...''}}<!--

-- end italic style if italic=yes given
-->{{#if:{{{italic|}}}|</span>}}<!--
-- closing brace unless braceinside=yes
-->{{#if:{{{braceinside|}}}||<nowiki>}}</nowiki>}}<!--
-- end code style if code=yes or tt=yes given
-->{{#if:{{{code|}}}{{{tt|}}}|</code>}}<!--
-- end
--></includeonly><noinclude>
{{Documentation}}
{{Documentation}}
<!-- Add categories and interwikis to the /doc subpage, not here! -->
</noinclude>
</noinclude>

Latest revision as of 12:29, April 30, 2022

{{Template:Template link general}}

Template documentation (for the above template, sometimes hidden or invisible)