Template:Text: Difference between revisions
(empty parameter invokes Template:NoText) |
|||
Line 1: | Line 1: | ||
<p>{{switch|{{{1}}} | <p>{{#if:{{{1|}}}||{{NoText}}|{{switch|{{{1}}} | ||
|case: 2=<b><big>{{flag|{{{2}}}|show}} and {{flag|{{{3}}}|show}} text</big></b><br><includeonly>{{#ifeq:{{{cat|{{{Cat|yes}}}}}}|no||[[Category:Texts]][[Category:{{{2}}} texts]][[Category:{{{3}}} texts]][[Category:Macaronic texts|2 {{PAGENAME}}]]}}</includeonly>{{#if:{{{4|}}}|{{#tag:poem|{{{4}}} }}}} | |case: 2=<b><big>{{flag|{{{2}}}|show}} and {{flag|{{{3}}}|show}} text</big></b><br><includeonly>{{#ifeq:{{{cat|{{{Cat|yes}}}}}}|no||[[Category:Texts]][[Category:{{{2}}} texts]][[Category:{{{3}}} texts]][[Category:Macaronic texts|2 {{PAGENAME}}]]}}</includeonly>{{#if:{{{4|}}}|{{#tag:poem|{{{4}}} }}}} | ||
|case: 3=<b><big>{{flag|{{{2}}}|show}}, {{flag|{{{3}}}|show}} and {{flag|{{{4}}}|show}} text</big></b><br><includeonly>{{#ifeq:{{{cat|{{{Cat|yes}}}}}}|no||[[Category:Texts]][[Category:{{{2}}} texts]][[Category:{{{3}}} texts]][[Category:{{{4}}} texts]][[Category:Macaronic texts|3 {{PAGENAME}}]]}}</includeonly>{{#if:{{{5|}}}|{{#tag:poem|{{{5}}} }}}} | |case: 3=<b><big>{{flag|{{{2}}}|show}}, {{flag|{{{3}}}|show}} and {{flag|{{{4}}}|show}} text</big></b><br><includeonly>{{#ifeq:{{{cat|{{{Cat|yes}}}}}}|no||[[Category:Texts]][[Category:{{{2}}} texts]][[Category:{{{3}}} texts]][[Category:{{{4}}} texts]][[Category:Macaronic texts|3 {{PAGENAME}}]]}}</includeonly>{{#if:{{{5|}}}|{{#tag:poem|{{{5}}} }}}} | ||
|default=<b><big>{{flag|{{{1}}}}} {{{pre|}}} {{{1}}} {{{post|}}} text</big></b><br><includeonly>{{#ifeq:{{{cat|{{{Cat|yes}}}}}}|no||[[Category:Texts]][[Category:{{{1}}} texts]]}}</includeonly>{{#if:{{{2|}}}|{{#tag:poem|{{{2}}} }}}} | |default=<b><big>{{flag|{{{1}}}}} {{{pre|}}} {{{1}}} {{{post|}}} text</big></b><br><includeonly>{{#ifeq:{{{cat|{{{Cat|yes}}}}}}|no||[[Category:Texts]][[Category:{{{1}}} texts]]}}</includeonly>{{#if:{{{2|}}}|{{#tag:poem|{{{2}}} }}}}}} | ||
}}</p><noinclude> | }}</p><noinclude> | ||
{{prot-temp}}<br> | {{prot-temp}}<br> | ||
Line 21: | Line 21: | ||
In the first three cases the template also inserts the page in the corresponding "''Language'' texts" category for each language, as well as in {{CiteCat|Macaronic texts}}. In the second three case, the page is not categorized in any of the Language texts categories (one may also use {{para|Cat|no}} with the same effect). The default value {{para|cat|yes}} (or {{para|Cat|yes}}) need not be entered). | In the first three cases the template also inserts the page in the corresponding "''Language'' texts" category for each language, as well as in {{CiteCat|Macaronic texts}}. In the second three case, the page is not categorized in any of the Language texts categories (one may also use {{para|Cat|no}} with the same effect). The default value {{para|cat|yes}} (or {{para|Cat|yes}}) need not be entered). | ||
'''Note:''' If no parameter is passed or if the first parameter is empty, the the template {{tl|NoText}} is invoked. | |||
'''Examples:''' | '''Examples:''' |
Revision as of 16:33, 28 August 2014
Text (or link to a text page) needs to be added.
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. |
Accepted syntaxes for this template:
- {{Text|Language}}
- {{Text|2|Language1|Language2}}
- {{Text|3|Language1|Language2|Language3}}
- {{Text|Language|cat=no}}
- {{Text|2|Language1|Language2|cat=no}}
- {{Text|3|Language1|Language2|Language3|cat=no}}
In the first three cases the template also inserts the page in the corresponding "Language texts" category for each language, as well as in Macaronic texts. In the second three case, the page is not categorized in any of the Language texts categories (one may also use |Cat=no
with the same effect). The default value |cat=yes
(or |Cat=yes
) need not be entered).
Note: If no parameter is passed or if the first parameter is empty, the the template {{NoText}} is invoked.
Examples:
- {{Text|2|Latin|German}}
displays as:
- {{Text|Quenya}}
(for which there is no corresponding language flag) displays as:
Text formatting:
1. Using external <poem> tags:
{{Text|Latin}} <poem> Ave Maria, gratia plena, Dominus tecum. Benedicta tu in mulieribus, et benedictus fructus ventris tui, Jesus. </poem>
2. Using the internal functionality (text is enclosed by the template):
{{Text|Latin| Ave Maria, gratia plena, Dominus tecum. Benedicta tu in mulieribus, et benedictus fructus ventris tui, Jesus. }}