Template:LinkText: Difference between revisions
No edit summary |
(interim save, updating documentation) |
||
Line 24: | Line 24: | ||
<h4>Specifying ''italics'' or plain display explicitly</h4> | <h4>Specifying ''italics'' or plain display explicitly</h4> | ||
'''However,''' one may '''override''' this default behavior by setting the '''parameter''' <tt>st{{eq}}</tt> (for no italics) or <tt><nowiki>st=''</nowiki></tt> (for italics) as in the following | '''However,''' one may '''override''' this default behavior by setting the '''parameter''' <tt>st{{eq}}</tt> (for no italics) or <tt><nowiki>st=''</nowiki></tt> (for italics) as in the following example: | ||
<pre>{{LinkText|Messiah|st=}}</pre> | <pre>{{LinkText|Messiah|st=}}</pre> | ||
producing (the preferred) | producing (the preferred) | ||
:{{LinkText|Messiah|st=}} | :{{LinkText|Messiah|st=}} | ||
and | When linking to more than one text, the parameter <tt>sp</tt> applies to each link display, and this can produce undesired reusults, such as: | ||
<pre>{{LinkText|3|Messiah|Pie Jesu|Psalm 118|st=''}}</pre> | <pre>{{LinkText|3|Messiah|Pie Jesu|Psalm 118|st=''}}</pre> | ||
producing (not good) | producing (not good) | ||
:{{LinkText|3|Messiah|Pie Jesu|Psalm 118|st=''}} | :{{LinkText|3|Messiah|Pie Jesu|Psalm 118|st=''}} | ||
<pre>{{LinkText|3| | <pre>{{LinkText|3|Messiah|Psalm 118|st=}}</pre> | ||
producing (not good) | producing (not good) | ||
:{{LinkText|3| | :{{LinkText|3|Messiah|Pie Jesu|Psalm 118|st=}} | ||
<pre>{{LinkText|3|Hallelujah| | '''For linking to 2 or 3 text pages:''' Instead of using the "blanket" parameter <tt>st</tt>, one can specify whether to italicize or not with the parameters <tt>st1</tt> (for the first parameter), <tt>st2</tt> (for the second parameter), and <tt>st3</tt> (for the third parameter). For example, | ||
<pre>{{LinkText|3|Hallelujah|Lamentations of Jeremiah|Paulus|st1=''|st2=|st3=''}}</pre> | |||
:{{LinkText|3|Hallelujah| | produces | ||
:{{LinkText|3|Hallelujah|Lamentations of Jeremiah|Paulus|st1=''|st2=|st3=''}} | |||
The same result could be obtained with | |||
<pre>{{LinkText|3|Hallelujah|Lamentations of Jeremiah|Paulus|st2=}}</pre> | |||
since "Hallelujah" and "Paulus" would be italicized by default. | |||
<h5>Extended syntax examples</h5> | <h5>Extended syntax examples</h5> |
Revision as of 15:34, 30 April 2009
Original text and translations may be found at [[{{{1}}}]].
This high-risk template has been protected from editing to prevent vandalism. Please use the talk page to ask an administrator about making an edit to change this template. |
Documentation
Default behavior
This template provides links for up to three text pages. Its default behavior is to italicize all links except those that begin with Psalm as in:
{{LinkText|Ave verum corpus}}
producing
- Original text and translations may be found at Ave verum corpus.
{{LinkText|2|Psalm 131|Wachet auf, ruft uns die Stimme}}
producing (for two pages)
- Original text and translations may be found at Psalm 131 and Wachet auf, ruft uns die Stimme.
and
{{LinkText|3|O magnum mysterium|Ave Maria|Psalm 150}}
producing (for three pages)
- Original text and translations may be found at O magnum mysterium, Ave Maria, and Psalm 150.
Specifying italics or plain display explicitly
However, one may override this default behavior by setting the parameter st= (for no italics) or st='' (for italics) as in the following example:
{{LinkText|Messiah|st=}}
producing (the preferred)
- Original text and translations may be found at Messiah.
When linking to more than one text, the parameter sp applies to each link display, and this can produce undesired reusults, such as:
{{LinkText|3|Messiah|Pie Jesu|Psalm 118|st=''}}
producing (not good)
{{LinkText|3|Messiah|Psalm 118|st=}}
producing (not good)
For linking to 2 or 3 text pages: Instead of using the "blanket" parameter st, one can specify whether to italicize or not with the parameters st1 (for the first parameter), st2 (for the second parameter), and st3 (for the third parameter). For example,
{{LinkText|3|Hallelujah|Lamentations of Jeremiah|Paulus|st1=''|st2=|st3=''}}
produces
- Original text and translations may be found at Hallelujah, Lamentations of Jeremiah, and Paulus.
The same result could be obtained with
{{LinkText|3|Hallelujah|Lamentations of Jeremiah|Paulus|st2=}}
since "Hallelujah" and "Paulus" would be italicized by default.
Extended syntax examples
To add more information at the end, when there is just one link, use the following scheme:
{{LinkText|Ave Maria|{{sp}}- ''Virgo serena''}}
produces
- Original text and translations may be found at Ave Maria - Virgo serena
and
{{LinkText|Lamentations of Jeremiah|{{sp}}'''1:1-5'''.|st=}}
(note the default italics have been overridden with "st=") produces
- Original text and translations may be found at Lamentations of Jeremiah 1:1-5.
More than one text (2 or 3):
{{LinkText|3|O magnum mysterium|Ave Maria|Alma Redemptoris Mater}}
produces
- Original text and translations may be found at O magnum mysterium, Ave Maria, and Alma Redemptoris Mater.
{{LinkText|2|Psalm 126|Psalm 95|add1=:1-9|add2=:3-6.}}
produces