Template talk:NoCo

From ChoralWiki
Jump to navigation Jump to search

Pagename vs. Title (Composer)

Is there a template (or can this one be tweaked) that will work with the parenthetical part of the page name, for publication pages or for a sandbox project? (I'm also wondering how to test {{#SortWorks: at User:Richard Mix/Gregorian chant (Gregorian chant)) Richard Mix (talk) 08:55, 27 October 2016 (UTC)

Hi Richard, the template CompFromWorkTitle seems to do what you need. As an example,
{{CompFromWorkTitle|Ave Maria (II) (Charles Gounod)}}
returns Charles Gounod. —Carlos (talk) 16:38, 28 October 2016 (UTC)
Thanks, I'll start using it at not exactly what I was looking for though: is there an alternative to piping every title at Choralis Constantinus (Heinrich Isaac)? Richard Mix (talk) 21:02, 28 October 2016 (UTC)
Template NoComp is the answer: type {{NoComp|Inclina aurem tuam|Heinrich Isaac}} on the related line. Claude (talk) 08:34, 29 October 2016 (UTC)
Oh, now I see what you meant, Richard! But in this case, piping is not a bad thing, in my opinion; replacing it with {{NoComp}} will save you just a few characters per title. And NoComp has the inconvenience of displaying titles in italics... —Carlos (talk) 17:33, 29 October 2016 (UTC)

If I type {{NoCo|Benedictus es, Domine}} on that page I get the desired italicization, but a link to Benedictus es, Domine (Choralis Constantinus (Heinrich Isaac)) because the NoCo template, being first designed for composer pages, assumes the page name is identical to the composer. It could be more widely useful if it looked for the parenthetical expression. Is it feasible for NoCo to take a page name in the form "Publication (Composer)" and produce a link to "Template argument (Composer)"? Richard Mix (talk) 22:37, 29 October 2016 (UTC)

To obtain the desired result, you may either use NoCo with a second parameter, or NoComp as suggested by Claude above:
  • {{NoCo|Template argument|comp=Composer}}
  • {{NoComp|Template argument|Composer}}
To use the syntax {{X|Template argument}} on a Publication page requires the creation of a new template "X", very similar to NoCo. Do you think it's worth creating it? What would be a good name for it? —Carlos (talk) 23:08, 29 October 2016 (UTC)
Similar, or identical, for the case X = NoCo ;-) Without understanding the coding, it seems to me that it wouldn't change the functionality of NoCo as now used to have the outputted link be Title (pagename or parenthetical part, if any, of pagename). I'm of course assuming we don't have composer names that include parentheses. Richard Mix (talk) 14:42, 30 October 2016 (UTC)