New templates for composer and work links

General help on the Wiki

Moderators: kcleung, Wiki Admins

Post Reply
pml
Copyright Reviewer
Posts: 1219
Joined: Fri Mar 16, 2007 3:42 am
notabot: 42
notabot2: Human
Location: Melbourne, Australia
Contact:

New templates for composer and work links

Post 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
--
PML (talk)
Davydov
Copyright Reviewer
Posts: 817
Joined: Sun Aug 17, 2008 8:31 am
notabot: 42
notabot2: Human
Contact:

Re: New templates for composer and work links

Post by Davydov »

They certainly will be useful! Many thanks, Philip, for coming up with those.
pml
Copyright Reviewer
Posts: 1219
Joined: Fri Mar 16, 2007 3:42 am
notabot: 42
notabot2: Human
Location: Melbourne, Australia
Contact:

Re: New templates for composer and work links

Post 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 :-)
--
PML (talk)
vinteuil
Groundskeeper
Posts: 1445
Joined: Sun Oct 05, 2008 3:01 pm
notabot: YES
notabot2: Bot
Location: U.S.A.
Contact:

Re: New templates for composer and work links

Post 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!
Formerly known as "perlnerd666"
Post Reply