Template:Tlg: Difference between revisions
Content added Content deleted
(minor compression of code, and kind of minimize reference to "tt" which is not actually semantically correct) |
(username removed) m (1 revision imported from loginwiki:Template:Tlg: Updating template with latest edits from loginwiki) |
||
(13 intermediate revisions by 9 users not shown) | |||
Line 1: | Line 1: | ||
{{#Invoke:Tlg|main}}<noinclude> |
|||
<includeonly><!-- |
|||
-- begin span of class "nowrap" if nowrap=yes |
|||
-->{{#if:{{{nowrap|}}}|<span class="nowrap">}}<!-- |
|||
-- begin code style if code=yes or tt=yes |
|||
-->{{#if:{{{code|{{{tt|}}}}}}|<code>}}<!-- |
|||
-- opening brace unless braceinside=yes |
|||
-->{{#if:{{{braceinside|}}}||<nowiki>{{</nowiki>}}<!-- |
|||
-- add subst prefix, if subst=yes |
|||
-->{{#if:{{{subst|}}}|[[Help:Substitution|subst]]:}}<!-- |
|||
-- begin boldface if bold=yes |
|||
-->{{#if:{{{bold|}}}|'''}}<!-- |
|||
-- create actual link (if not nolink=yes) |
|||
-->{{#if:{{{nolink|}}} |
|||
|<!-- nolink=yes --> |
|||
|{{#if:{{{braceinside|}}}|<nowiki>{</nowiki>}}<!-- first opening brace before link if braceinside=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:{{#if:{{{1|}}}|{{{1}}}|{{FULLPAGENAME}}}}}} |
|||
|{{ns:0}}={{ns:10}}:{{#if:{{{1|}}}|{{PAGENAME:{{{1}}}}}|{{PAGENAME}}}} <!-- No ns given: we want to link to template ns --> |
|||
|#default={{#if:{{{1|}}}|{{FULLPAGENAME:{{{1}}}}}|{{FULLPAGENAME}}}}<!-- |
|||
-->}}<!-- |
|||
-->}}{{!}}<!-- <<--- pipe character in link |
|||
-->}}<!-- |
|||
-- create link text |
|||
-- second opening brace if braceinside=yes |
|||
-->{{#if:{{{braceinside|}}}|<nowiki>{</nowiki>}}<!-- |
|||
-- surface text of link |
|||
-->{{{alttext|{{#if:{{{1|}}}|{{{1}}}|{{#ifeq:{{NAMESPACE}}|{{ns:Template}}|{{PAGENAME}}|{{FULLPAGENAME}}}}}}}}}<!-- |
|||
-- first closing brace if braceinside=yes |
|||
-->{{#if:{{{braceinside|}}}|<nowiki>}</nowiki>}}<!-- |
|||
-- end of link, unless nolink=yes |
|||
-->{{#if:{{{nolink|}}}||]]<!-- |
|||
-- second closing brace after link if braceinside=yes |
|||
-->{{#if:{{{braceinside|}}}|<nowiki>}</nowiki>}}<!-- |
|||
-->}}<!-- |
|||
-- end boldface if bold=yes |
|||
-->{{#if:{{{bold|}}}|'''}}<!-- |
|||
-- begin italic style if italic=yes |
|||
-->{{#if:{{{italic|}}}|<span style="font-style: italic;">}}<!-- |
|||
-- add parameters |
|||
-->{{#ifeq:{{{2|¬}}}|¬|||{{#tag:nowiki|{{{2}}}}}}}<!-- |
|||
-->{{#ifeq:{{{3|¬}}}|¬|||{{#tag:nowiki|{{{3}}}}}}}<!-- |
|||
-->{{#ifeq:{{{4|¬}}}|¬|||{{#tag:nowiki|{{{4}}}}}}}<!-- |
|||
-->{{#ifeq:{{{5|¬}}}|¬|||{{#tag:nowiki|{{{5}}}}}}}<!-- |
|||
-->{{#ifeq:{{{6|¬}}}|¬|||{{#tag:nowiki|{{{6}}}}}}}<!-- |
|||
-->{{#ifeq:{{{7|¬}}}|¬|||{{#tag:nowiki|{{{7}}}}}}}<!-- |
|||
-->{{#ifeq:{{{8|¬}}}|¬|||{{#tag:nowiki|{{{8}}}}}}}<!-- |
|||
-->{{#ifeq:{{{9|¬}}}|¬|||{{#tag:nowiki|{{{9}}}}}}}<!-- |
|||
-->{{#ifeq:{{{10|¬}}}|¬|||{{#tag:nowiki|{{{10}}}}}}}<!-- |
|||
-->{{#ifeq:{{{11|¬}}}|¬|||{{#tag:nowiki|{{{11}}}}}}}<!-- |
|||
-->{{#if:{{{12|}}}||…}}<!-- |
|||
-- end italic style if italic=yes |
|||
-->{{#if:{{{italic|}}}|</span>}}<!-- |
|||
-- closing brace unless braceinside=yes |
|||
-->{{#if:{{{braceinside|}}}||<nowiki>}}</nowiki>}}<!-- |
|||
-- end code style if code=yes or tt=yes |
|||
-->{{#if:{{{code|{{{tt|}}}}}}|</code>}}<!-- |
|||
-- end span of class "nowrap" if nowrap=yes |
|||
-->{{#if:{{{nowrap|}}}|</span>}}<!-- |
|||
-- end |
|||
--></includeonly><noinclude> |
|||
{{Documentation}} |
{{Documentation}} |
||
<!-- Add categories and interwikis to the /doc subpage, not here! --> |
|||
</noinclude> |
</noinclude> |
Latest revision as of 01:09, 21 March 2022
{{Template:Tlg}}