Better use of the Category function.
Posted: Wed May 13, 2009 8:24 pm
Hi everyone...
On and off I've been experimenting with using the Category function to classify works. I was trying to make a category for works with orchestral parts. My goal was to create a category [[Category: Oboe Orchestral Parts]] - for those that had parts for this instrument - and of course for those works with complete sets available I would then have something like [[Category: Complete Orchestral Parts]].
This already works in principle, however on the Category page, the works come sorted by page title. This is Ok sometimes, but it would be better to have them sorted by composer. Again this is possible in theory - the mediawiki category function allows a sort key such as [[Category: xxxxx | sortkey ]] . This seems difficult to use without retyping the composer name every time it is used. I was experimenting with a template to do it in automated style.
I tried to be clever using the int:composer variable in the #fte:imslppage template, giving this...
[[Category:Oboe Orchestral Parts|{{int:composer}}]]
However this doesn't seem to work, as invoking {{int:composer}} returns the simple string "<composer>". Now I believe I understand why. I am right in assuming that the variable int:composer is only active during the display of a page and not during the 'save' of a page when the categories are compiled?
Is there a wikimedia guru among our numerous staff who can confirm that?
Perhaps what we need are a couple of magic words like {{PAGENAME}}. Thus we might construct {{COMPOSERNAME}} and {{WORKNAME}} to help our categorization efforts. {{COMPOSERNAME}} would return just the composer's name as it appears in the category, {{WORKNAME}} would return the name of the work *without* the composer. My clever template would then look like [[Category: Oboe Orchestral Parts|{{COMPOSERNAME}}]] and then everything would work wonderfully! We can then begin to enlarge the browsing options for users.
I do see a few other posts submitted from time to time, complaining about the lack of search / genre category abilities. Further to this... we don't need to invent new genre names... we can follow the Library of Congress subject headings.... but I am rambling on here... I'll save this for another day and another post, at such a time that we can actually begin using such a feature....
Comments? Suggestions?
Homer.
On and off I've been experimenting with using the Category function to classify works. I was trying to make a category for works with orchestral parts. My goal was to create a category [[Category: Oboe Orchestral Parts]] - for those that had parts for this instrument - and of course for those works with complete sets available I would then have something like [[Category: Complete Orchestral Parts]].
This already works in principle, however on the Category page, the works come sorted by page title. This is Ok sometimes, but it would be better to have them sorted by composer. Again this is possible in theory - the mediawiki category function allows a sort key such as [[Category: xxxxx | sortkey ]] . This seems difficult to use without retyping the composer name every time it is used. I was experimenting with a template to do it in automated style.
I tried to be clever using the int:composer variable in the #fte:imslppage template, giving this...
[[Category:Oboe Orchestral Parts|{{int:composer}}]]
However this doesn't seem to work, as invoking {{int:composer}} returns the simple string "<composer>". Now I believe I understand why. I am right in assuming that the variable int:composer is only active during the display of a page and not during the 'save' of a page when the categories are compiled?
Is there a wikimedia guru among our numerous staff who can confirm that?
Perhaps what we need are a couple of magic words like {{PAGENAME}}. Thus we might construct {{COMPOSERNAME}} and {{WORKNAME}} to help our categorization efforts. {{COMPOSERNAME}} would return just the composer's name as it appears in the category, {{WORKNAME}} would return the name of the work *without* the composer. My clever template would then look like [[Category: Oboe Orchestral Parts|{{COMPOSERNAME}}]] and then everything would work wonderfully! We can then begin to enlarge the browsing options for users.
I do see a few other posts submitted from time to time, complaining about the lack of search / genre category abilities. Further to this... we don't need to invent new genre names... we can follow the Library of Congress subject headings.... but I am rambling on here... I'll save this for another day and another post, at such a time that we can actually begin using such a feature....
Comments? Suggestions?
Homer.