Difference between revisions of "Template:Lyricist"

From ChoralWiki
Jump to: navigation, search
(if Lyricist = Composer, don't categorize in Lyricist_settings)
(fixed logic in the case of Lyricist = Composer)
Line 1: Line 1:
 
<includeonly>{{#switch:{{{1}}}
 
<includeonly>{{#switch:{{{1}}}
|2 ='''Lyricists:''' [[{{{2}}}]]{{#if:{{{5|}}}|{{{4|}}}}} and [[{{{3}}}]]{{{5|{{{4|}}}}}} {{#ifexist: Category:{{{2}}} compositions||[[Category:{{{2}}} settings]]}} {{#ifexist: Category:{{{3}}} compositions||[[Category:{{{3}}} settings]]}}
+
|2 ='''Lyricists:''' [[{{{2}}}]]{{#if:{{{5|}}}|{{{4|}}}}} and [[{{{3}}}]]{{{5|{{{4|}}}}}} {{#ifexist: Category:{{{2}}} compositions||[[Category:{{{2}}} settings]]}} {{#if: {{#pos: {{PAGENAME}}|{{{3}}} }} ||[[Category:{{{3}}} settings]]}}
|3 ='''Lyricists:''' [[{{{2}}}]]{{#if:{{{6|}}}|{{{5|}}}}}, [[{{{3}}}]]{{{6|}}} and [[{{{4}}}]]{{{7|{{#if:{{{6|}}}||{{{5|}}}}}}}} {{#ifexist: Category:{{{2}}} compositions||[[Category:{{{2}}} settings]]}} {{#ifexist: Category:{{{3}}} compositions||[[Category:{{{3}}} settings]]}} {{#ifexist: Category:{{{4}}} compositions||[[Category:{{{4}}} settings]]}}
+
|3 ='''Lyricists:''' [[{{{2}}}]]{{#if:{{{6|}}}|{{{5|}}}}}, [[{{{3}}}]]{{{6|}}} and [[{{{4}}}]]{{{7|{{#if:{{{6|}}}||{{{5|}}}}}}}} {{#ifexist: Category:{{{2}}} compositions||[[Category:{{{2}}} settings]]}} {{#ifexist: Category:{{{3}}} compositions||[[Category:{{{3}}} settings]]}} {{#if: {{#pos: {{PAGENAME}}|{{{4}}} }} ||[[Category:{{{4}}} settings]]}}
 
|Anonymous
 
|Anonymous
 
|Traditional
 
|Traditional
 
|Unknown ='''Lyricist:''' [[Anonymous lyricist|{{{1}}}]]{{{2|}}} [[Category:Anonymous lyricist settings]]
 
|Unknown ='''Lyricist:''' [[Anonymous lyricist|{{{1}}}]]{{{2|}}} [[Category:Anonymous lyricist settings]]
|'''Lyricist:''' [[{{{1}}}]]{{{2|}}} {{#ifexist: Category:{{{1}}} compositions||[[Category:{{{1}}} settings]]}}
+
|'''Lyricist:''' [[{{{1}}}]]{{{2|}}} {{#if: {{#pos: {{PAGENAME}}|{{{1}}} }} ||[[Category:{{{1}}} settings]]}}
 
}}</includeonly><noinclude>
 
}}</includeonly><noinclude>
 
{{prot-temp}}<br>
 
{{prot-temp}}<br>
Line 13: Line 13:
 
;Usage:
 
;Usage:
  
*<tt><nowiki>{{Lyricist|</nowiki>''lyricist_name''|''optional_text''}}</tt>
+
*<tt><nowiki>{{Lyricist|</nowiki>''<lyricist_name>''|''<optional_text>''}}</tt>
 
:which produces the text
 
:which produces the text
::'''Lyricist:''' <font color=blue><nowiki>lyricist_name</nowiki></font> optional_text
+
::'''Lyricist:''' <font color=blue>Lyricist_name</font> optional_text
:and inserts the page in <nowiki>[[Category:lyricist_name settings]]</nowiki>
+
:and inserts the page in category ''Lyricist_name settings''
  
*<tt><nowiki>{{Lyricist|</nowiki>''2''|''lyricist1_name''|''lyricist2_name''|''optional_text''}}</tt>
+
*<tt><nowiki>{{Lyricist|</nowiki>''2''|''<lyricist1_name>''|''<lyricist2_name>''|''<optional_text>''}}</tt>
 
:which produces the text
 
:which produces the text
::'''Lyricists:''' <font color=blue><nowiki>lyricist1_name</nowiki></font> and <font color=blue><nowiki>lyricist2_name</nowiki></font> optional_text
+
::'''Lyricists:''' <font color=blue>Lyricist1_name</font> and <font color=blue>Lyricist2_name</font> optional_text
:and inserts the page in <nowiki>[[Category:lyricist1_name settings]] and [[Category:lyricist2_name settings]]</nowiki>
+
:and inserts the page in categories ''Lyricist1_name settings'' and ''Lyricist2_name settings''
  
*<tt><nowiki>{{Lyricist|</nowiki>''3''|''lyricist1_name''|''lyricist2_name''|''lyricist3_name''|''optional_text''}}</tt>
+
*<tt><nowiki>{{Lyricist|</nowiki>''3''|''<lyricist1_name>''|''<lyricist2_name>''|''<lyricist3_name>''|''<optional_text>''}}</tt>
 
:which produces the text
 
:which produces the text
::'''Lyricists:''' <font color=blue><nowiki>lyricist1_name</nowiki></font>, <font color=blue><nowiki>lyricist2_name</nowiki></font> and <font color=blue><nowiki>lyricist3_name</nowiki></font> optional_text
+
::'''Lyricists:''' <font color=blue>Lyricist1_name</font>, <font color=blue>Lyricist2_name</font> and <font color=blue>Lyricist3_name</font> optional_text
:and inserts the page in <nowiki>[[Category:lyricist1_name settings]], [[Category:lyricist2_name settings]] and [[Category:lyricist3_name settings]]</nowiki>
+
:and inserts the page in categories ''Lyricist1_name settings'', ''Lyricist2_name settings'' and ''Lyricist3_name settings''
  
 
</div>[[Category:Templates|{{PAGENAME}}]]</noinclude>
 
</div>[[Category:Templates|{{PAGENAME}}]]</noinclude>

Revision as of 04:35, 16 May 2009


Documentation
Usage
  • {{Lyricist|<lyricist_name>|<optional_text>}}
which produces the text
Lyricist: Lyricist_name optional_text
and inserts the page in category Lyricist_name settings
  • {{Lyricist|2|<lyricist1_name>|<lyricist2_name>|<optional_text>}}
which produces the text
Lyricists: Lyricist1_name and Lyricist2_name optional_text
and inserts the page in categories Lyricist1_name settings and Lyricist2_name settings
  • {{Lyricist|3|<lyricist1_name>|<lyricist2_name>|<lyricist3_name>|<optional_text>}}
which produces the text
Lyricists: Lyricist1_name, Lyricist2_name and Lyricist3_name optional_text
and inserts the page in categories Lyricist1_name settings, Lyricist2_name settings and Lyricist3_name settings