Template:LnkTxt: Difference between revisions

From ChoralWiki
Jump to navigation Jump to search
(add space before sort key (don't need first letters of last names to appear in relatively short lists))
(revise documentation somewhat)
Line 3: Line 3:
[[Category:Templates|{{PAGENAME}}]]
[[Category:Templates|{{PAGENAME}}]]
<div><div style="margin: 0; margin-right: 30px; margin-left: 30px; border: 1px solid #3399ff; padding: 1em 1em 1em 1em; background-color:#ddffdd">
<div><div style="margin: 0; margin-right: 30px; margin-left: 30px; border: 1px solid #3399ff; padding: 1em 1em 1em 1em; background-color:#ddffdd">
<center><big>'''Documentation'''</big><br>
<center><big>'''Documentation'''</big><br></center>
'''This is a test template'''</center>


'''Syntax example:'''
'''Syntax example:'''


<tt><nowiki>{{LnkTxt|O salutaris hostia|Beethoven, Ludwig van}}</nowiki></tt>
<tt><nowiki>{{LnkTxt|Psalm 150|Franck, Cesar}}</nowiki></tt>


which produces the text
which produces the text


Original text and translations may be found at '''{{CiteCat|O salutaris hostia}}'''.
Original text and translations may be found at '''{{CiteCat|Psalm 150}}'''.
 
The page is categorized under [[:Category:Psalm 150]] with the sort key (preceded by a space): Franck, Cesar.


'''And extended syntax example:'''
'''And extended syntax example:'''


<tt><nowiki>{{LnkTxt|O salutaris hostia|Beethoven, Ludwig van|, but ignore this.}}</nowiki></tt>
<tt><nowiki>{{LnkTxt|Psalm 150|Clarke-Whitfield, John|: vv. 1, 2, 6.}}</nowiki></tt>


which produces the text
which produces the text


Original text and translations may be found at '''{{CiteCat|O salutaris hostia}}''', but ignore this.
Original text and translations may be found at '''{{CiteCat|Psalm 150}}''': vv. 1, 2, 6.


In both cases, the page is categorized in [[:Category:O salutaris hostia]], with the sort key(preceded by a space): Beethoven, Ludwig van.
The page is categorized in [[:Category:Psalm 150]], with the sort key(preceded by a space): Clarke-Whitfield, John.


There is an optional 4th parameter (mainly for Latin text titles) which may be used as follows:
There is an optional 4th parameter (mainly for Latin text titles) which may be used as follows:
Line 28: Line 29:
<tt><nowiki>{{LnkTxt|O salutaris hostia|Beethoven, Ludwig van|4=''}}</nowiki></tt>
<tt><nowiki>{{LnkTxt|O salutaris hostia|Beethoven, Ludwig van|4=''}}</nowiki></tt>


which produces the text
which produces the text (note that the title is ''italicized''):


Original text and translations may be found at '''''{{CiteCat|O salutaris hostia}}'''''.
Original text and translations may be found at '''''{{CiteCat|O salutaris hostia}}'''''.


However, the same result is more easily obtained through [[Template:LnkLatTxt]]:


<tt><nowiki>{{LnkLatTxt|O salutaris hostia|Beethoven, Ludwig van}}</tt></nowiki>


</div>
</div>
</noinclude>
</noinclude>

Revision as of 12:54, 18 April 2008

Original text and translations may be found at [[:Category:{{{1}}}|{{{1}}}]].

Documentation

Syntax example:

{{LnkTxt|Psalm 150|Franck, Cesar}}

which produces the text

Original text and translations may be found at Psalm 150.

The page is categorized under Category:Psalm 150 with the sort key (preceded by a space): Franck, Cesar.

And extended syntax example:

{{LnkTxt|Psalm 150|Clarke-Whitfield, John|: vv. 1, 2, 6.}}

which produces the text

Original text and translations may be found at Psalm 150: vv. 1, 2, 6.

The page is categorized in Category:Psalm 150, with the sort key(preceded by a space): Clarke-Whitfield, John.

There is an optional 4th parameter (mainly for Latin text titles) which may be used as follows:

{{LnkTxt|O salutaris hostia|Beethoven, Ludwig van|4=''}}

which produces the text (note that the title is italicized):

Original text and translations may be found at O salutaris hostia.

However, the same result is more easily obtained through Template:LnkLatTxt:

{{LnkLatTxt|O salutaris hostia|Beethoven, Ludwig van}}</tt>