Template:Tlg: Difference between revisions
Jump to navigation
Jump to search
Content added Content deleted
m (Changed protection level of Template:Tlg: Per Template:Tlx ([Edit=Allow only template editors and admins] (indefinite) [Move=Allow only administrators] (indefinite))) |
(Update via sandbox/testcases ("plaincode" option, "boldlink"/"boldname" and "italics" alternatives)) |
||
Line 1: | Line 1: | ||
<includeonly><!-- |
<includeonly><!-- |
||
⚫ | |||
-- begin span of class "nowrap" if nowrap=yes |
|||
-->{{#if:{{{ |
-->{{#if:{{{code|{{{tt|}}}}}} |<code> |{{#if:{{{plaincode|}}}|<code style="border:none;background:transparent;">}} }}<!-- |
||
⚫ | |||
-- begin code style if code=yes or tt=yes |
|||
-->{{#if:{{{ |
-->{{#if:{{{subst|}}} |[[Help:Substitution|subst]]:}}<!-- |
||
-- opening brace unless braceinside=yes |
|||
⚫ | |||
-- add subst prefix, if subst=yes |
|||
-->{{#if:{{{subst|}}}|[[Help:Substitution|subst]]:}}<!-- |
|||
-- begin boldface if bold=yes |
|||
⚫ | |||
-->{{#if:{{{bold|{{{boldlink|{{{boldname|}}}}}}}}} |'''}}<!-- |
|||
-- create actual link (if not nolink=yes) |
|||
-->{{#if:{{{nolink|}}} |
-->{{#if:{{{nolink|}}} |<!--then omit template link, else: |
||
⚫ | |||
|<!-- nolink=yes --> |
|||
-->{{!((}}:<!--(start building link with "[[:") |
|||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
else:--> |{{#switch:{{NAMESPACE:{{#if:{{{1|}}}|{{{1}}}|{{FULLPAGENAME}}}}}} |
|||
|: |
|||
⚫ | |||
|{{FULLPAGENAME:{{{1}}}}} <!-- if yes: link to article ns or assume other valid link, e.g. Interwikilink --> |
|||
| |
| #default = {{#if:{{{1|}}}|{{FULLPAGENAME:{{{1}}}}}|{{FULLPAGENAME}}}} |
||
}}}}<!-- |
|||
⚫ | |||
-->{{!}}<!--(pipe between link and label, i.e. [[:link|label]]) |
|||
⚫ | |||
-->}}<!-- |
|||
⚫ | |||
-->}}{{!}}<!-- <<--- pipe character in link |
|||
label / template name: |
|||
⚫ | |||
-->{{{alttext|{{#if:{{{1|}}}|{{{1}}}|{{#ifeq:{{NAMESPACE}}|{{ns:Template}}|{{PAGENAME}}|{{FULLPAGENAME}}}}}}}}}<!-- |
|||
⚫ | |||
-->{{#if:{{{nolink|}}} | |<!-- |
|||
⚫ | |||
⚫ | |||
⚫ | |||
-->{{#if:{{{bold|{{{boldlink|{{{boldname|}}}}}}}}} |'''}}<!-- |
|||
⚫ | |||
-- create link text |
|||
⚫ | |||
-- second opening brace if braceinside=yes |
|||
-->{{# |
-->{{#ifeq:{{{3|¬}}}|¬ | ||{{#tag:nowiki|{{{3}}}}}}}<!-- |
||
⚫ | |||
-- surface text of link |
|||
--> |
-->{{#ifeq:{{{5|¬}}}|¬ | ||{{#tag:nowiki|{{{5}}}}}}}<!-- |
||
⚫ | |||
-- first closing brace if braceinside=yes |
|||
-->{{# |
-->{{#ifeq:{{{7|¬}}}|¬ | ||{{#tag:nowiki|{{{7}}}}}}}<!-- |
||
⚫ | |||
-- end of link, unless nolink=yes |
|||
-->{{# |
-->{{#ifeq:{{{9|¬}}}|¬ | ||{{#tag:nowiki|{{{9}}}}}}}<!-- |
||
⚫ | |||
-- second closing brace after link if braceinside=yes |
|||
-->{{# |
-->{{#ifeq:{{{11|¬}}}|¬ | ||{{#tag:nowiki|{{{11}}}}}}}<!-- |
||
-->}}<!-- |
-->{{#if:{{{12|}}} ||…}}<!-- |
||
-->{{#if:{{{italic|{{{italics|}}}}}} |</span>}}<!-- |
|||
-->{{#if:{{{braceinside|}}} | |<nowiki>}}</nowiki>}}<!-- |
|||
-- end boldface if bold=yes |
|||
-->{{#if:{{{ |
-->{{#if:{{{code|{{{tt|}}}}}}{{{plaincode|}}} |</code>}}<!-- |
||
⚫ | |||
-- begin italic style if italic=yes |
|||
⚫ | |||
-- add parameters |
|||
⚫ | |||
-->{{#ifeq:{{{3|¬}}}|¬|||{{#tag:nowiki|{{{3}}}}}}}<!-- |
|||
⚫ | |||
-->{{#ifeq:{{{5|¬}}}|¬|||{{#tag:nowiki|{{{5}}}}}}}<!-- |
|||
⚫ | |||
-->{{#ifeq:{{{7|¬}}}|¬|||{{#tag:nowiki|{{{7}}}}}}}<!-- |
|||
⚫ | |||
-->{{#ifeq:{{{9|¬}}}|¬|||{{#tag:nowiki|{{{9}}}}}}}<!-- |
|||
⚫ | |||
-->{{#ifeq:{{{11|¬}}}|¬|||{{#tag:nowiki|{{{11}}}}}}}<!-- |
|||
⚫ | |||
-- end italic style if italic=yes |
|||
⚫ | |||
-- closing brace unless braceinside=yes |
|||
⚫ | |||
-- end code style if code=yes or tt=yes |
|||
⚫ | |||
-- end span of class "nowrap" if nowrap=yes |
|||
⚫ | |||
-- end |
|||
--></includeonly><noinclude> |
--></includeonly><noinclude> |
||
{{Documentation}} |
{{Documentation}} |
||
<!-- Add categories and interwikis to the /doc subpage, not here! --> |
|||
</noinclude> |
</noinclude> |