New templates for composer and work links
Posted: Mon Apr 06, 2009 11:43 pm
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
[[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