Page 1 of 1

New templates for composer and work links

Posted: Mon Apr 06, 2009 11:43 pm
by pml
It seems we have a lot people putting lists of links together at present. The instrument lists are a prime example, and some of them are among the lengthiest pages in the wiki. On these pages the links are presorted under a composer's name, and the links to the works pages then have the composer's name removed, which in Wiki formatting goes like this:

[[Sonata (Bloggs, Jo)|Sonata]]

which is fine for works with short titles: a work with a long title ends up being nearly twice as long as it needs to be, e.g.:

[[11 Pièces dans le style religieux, et une transcription du Messie de Hændel, Op.72 (Alkan, Charles-Valentin)|11 Pièces dans le style religieux, et une transcription du Messie de Hændel, Op.72]]

This tends to make these pages rather awful to edit, so I've devised a template to help with this, particularly for use on long or complex pages, called {{NoComp}}. The two examples above would be generated by:
{{NoComp|Sonata|Bloggs, Jo}}
{{NoComp|11 Pièces dans le style religieux, et une transcription du Messie de Hændel, Op.72|Alkan, Charles-Valentin}}

Applying this technique to the longest of the instrument list pages (works for organ and harpsichord) reduced the length from 69 kilobytes to 53 KB. I don't believe it should introduce a huge amount of preprocessing at the server end, since only one template is involved and it would remain cached.

I also made a template, {{LinkComp}}, for making a link to a composer's name (usually a category page in the form: surname(s), first name(s)) while displaying the whole name in the more normative order. Thus:

{{LinkComp|Johann Sebastian|Bach}} —» Johann Sebastian Bach

Someone might find these useful...

Regards, PML

Re: New templates for composer and work links

Posted: Tue Apr 07, 2009 5:33 pm
by Davydov
They certainly will be useful! Many thanks, Philip, for coming up with those.

Re: New templates for composer and work links

Posted: Thu Apr 09, 2009 2:12 am
by pml
One place where the latter template should prove useful is Editors/Composers. We normally list an editor's given names in the normal fashion, and include a link if there is an associated composer page — Brahms is a classic example.

I've also made a variant LinkCompS which only returns the surname as the link, not the full name. Same format as LinkComp, just add the S to specify surname only.

PML :-)

Re: New templates for composer and work links

Posted: Thu Apr 09, 2009 11:04 pm
by vinteuil
We should use these in three places:
1. Composer composition lists
2. Instrument Lists (Featured, parts, etc.)
3. Misc. (The ones I created, for starters)
Great idea! Thanks!