Template:soplink: difference between revisions

Definition from Wiktionary, the free dictionary
Jump to: navigation, search
(a bit more)
({{{alt}}})
(One intermediate revision by the same user not shown)
Line 17: Line 17:
 
the 10th parameter: -->{{safesubst:#if:{{{10|}}}|{{safesubst:#switch:{{{9}}}|-|/|{{=}}={{{8}}}|{{safesubst:#switch:{{{10}}}|-|/={{{10}}}|{{=}}=|&#32;{{{form10|{{{10}}}}}}}}}}}}<!--
 
the 10th parameter: -->{{safesubst:#if:{{{10|}}}|{{safesubst:#switch:{{{9}}}|-|/|{{=}}={{{8}}}|{{safesubst:#switch:{{{10}}}|-|/={{{10}}}|{{=}}=|&#32;{{{form10|{{{10}}}}}}}}}}}}<!--
 
Until here was generating the 'sum', to test whether it exists. If it does exist:
 
Until here was generating the 'sum', to test whether it exists. If it does exist:
Call template:l to generate the link: -->|{{l|{{{lang|en}}}|sc={{{sc|}}}|<!--
+
Generate the link: -->|{{Xyzy|lang={{{lang|en}}}|sc={{{sc|}}}|[[<!--
 
and include the 1st parameter: -->{{{form1|{{{1}}}}}}<!--
 
and include the 1st parameter: -->{{{form1|{{{1}}}}}}<!--
 
the 2nd parameter (same as above in the test): -->{{safesubst:#if:{{{2|}}}|{{safesubst:#switch:{{{1}}}|-|/|{{=}}={{{2}}}|{{safesubst:#switch:{{{2}}}|-|/={{{2}}}|{{=}}=|&#32;{{{form2|{{{2}}}}}}}}}}}}<!--
 
the 2nd parameter (same as above in the test): -->{{safesubst:#if:{{{2|}}}|{{safesubst:#switch:{{{1}}}|-|/|{{=}}={{{2}}}|{{safesubst:#switch:{{{2}}}|-|/={{{2}}}|{{=}}=|&#32;{{{form2|{{{2}}}}}}}}}}}}<!--
Line 28: Line 28:
 
the 9th parameter: -->{{safesubst:#if:{{{9|}}}|{{safesubst:#switch:{{{8}}}|-|/|{{=}}={{{9}}}|{{safesubst:#switch:{{{9}}}|-|/={{{9}}}|{{=}}=|&#32;{{{form9|{{{9}}}}}}}}}}}}<!--
 
the 9th parameter: -->{{safesubst:#if:{{{9|}}}|{{safesubst:#switch:{{{8}}}|-|/|{{=}}={{{9}}}|{{safesubst:#switch:{{{9}}}|-|/={{{9}}}|{{=}}=|&#32;{{{form9|{{{9}}}}}}}}}}}}<!--
 
the 10th parameter: -->{{safesubst:#if:{{{10|}}}|{{safesubst:#switch:{{{9}}}|-|/|{{=}}={{{10}}}|{{safesubst:#switch:{{{10}}}|-|/={{{10}}}|{{=}}=|&#32;{{{form10|{{{10}}}}}}}}}}}}<!--
 
the 10th parameter: -->{{safesubst:#if:{{{10|}}}|{{safesubst:#switch:{{{9}}}|-|/|{{=}}={{{10}}}|{{safesubst:#switch:{{{10}}}|-|/={{{10}}}|{{=}}=|&#32;{{{form10|{{{10}}}}}}}}}}}}<!--
Close off template:l: -->}}<!--
+
Anchor and display text for the link-->#{{{{{lang|en}}}}}|{{{alt|}}}]]<!--
  +
Close off Xyzy -->}}<!--
 
Otherwise, the 'sum' doesn't exist, so we display the 'parts':
 
Otherwise, the 'sum' doesn't exist, so we display the 'parts':
 
first paremeter -->|{{l|{{{lang|en}}}|sc={{{sc|}}}|{{{1}}}|{{{alt1|{{{form1|{{{1}}}}}}}}}}}<!--
 
first paremeter -->|{{l|{{{lang|en}}}|sc={{{sc|}}}|{{{1}}}|{{{alt1|{{{form1|{{{1}}}}}}}}}}}<!--

Revision as of 06:43, 20 January 2013


Usage

Used to link to a suspected sum of parts if it exists as an entry, and to the parts otherwise.

This template can be substed.

The arguments (up to ten) are the parts, including hyphens and slashes but not spaces, which will be added by the template. If two parts abut (with no space between them) in the whole, use {{=}} as the parameter between them.

The optional parameters form1, form2, ..., form10 are for the forms the parts take when part of the whole, and default to the corresponding numbered parameters if absent.

Each optional parameter alt1, alt2, ..., alt10 is for the display text for the corresponding part if the whole does not exist as an entry, and defaults to the corresponding form... parameter (above) if absent, and to the corresponding positional parameter if the form... parameter is also absent.

The parameter lang is for the language code, mandatory when it's not en (for English).

The optional parameter sc is for the script code.

Examples