Extending Template:Lyricist

Forum for all users to discuss the implementation and operation of the ChoralWiki at CPDL
Post Reply
bobnotts
Site Admin
Posts: 982
Joined: 11 Mar 2006 19:05
Location: UK

Extending Template:Lyricist

Post by bobnotts »

Would it be possible to extend Template:Lyricist to allow for comments after each individuals' names? This score page looks a bit untidy because the lyricists all have to be listed on separate lines with individual templates. Could we have an optional syntax of:

{{Lyricist|1=Joe Bloggs|Comment1= (part 1)|2=John Smith|Comment2= (part 2)|3=John Brown|Comment3= (part3)}}

which would output:

'''Lyricists:''' [[Joe Bloggs]] (part 1), [[John Smith]] (part 2) and [[John Brown]] (part3)
Rob Nottingham
CPDL Administrator
bobnotts
Site Admin
Posts: 982
Joined: 11 Mar 2006 19:05
Location: UK

Re: Extending Template:Lyricist

Post by bobnotts »

Is there any chance of this? We have the same problem with this page. TIA!
Rob Nottingham
CPDL Administrator
carlos
Site Admin
Posts: 1870
Joined: 19 Aug 2008 15:26
Location: São Paulo, Brasil

Re: Extending Template:Lyricist

Post by carlos »

Done, Rob, the new syntax is as follows:

Code: Select all

{{Lyricist|lyricistname|optionaltext|9=optional_sortkey}}
{{Lyricist|2|lyricistname_1|lyricistname_2|optionaltext|9=optional_sortkey}}
{{Lyricist|2|lyricistname_1|lyricistname_2|optionaltext_1|optionaltext_2|9=optional_sortkey}}
{{Lyricist|3|lyricistname_1|lyricistname_2|lyricistname_3|optional_text|9=optional_sortkey}}
{{Lyricist|3|lyricistname_1|lyricistname_2|lyricistname_3|optionaltext_1|optionaltext_2||9=optional_sortkey}}
{{Lyricist|3|lyricistname_1|lyricistname_2|lyricistname_3|optionaltext_1|optionaltext_2|optionaltext_3|9=optional_sortkey}}
Whenever just one text is provided, it goes to the end of the line (for compatibility reasons). If more than one text is provided, each one goes right after the corresponding lyricist name.

Taking your example, the same can be accomplished this way:

Code: Select all

{{Lyricist|3|Joe Bloggs|5= (part 1)|John Smith|6= (part 2)|John Brown|7= (part3)}}
bobnotts
Site Admin
Posts: 982
Joined: 11 Mar 2006 19:05
Location: UK

Re: Extending Template:Lyricist

Post by bobnotts »

Thanks, Carlos - that's great. I've just fixed those two score pages.
Rob Nottingham
CPDL Administrator
Post Reply