Template talk:PostedOn

From ChoralWiki
Revision as of 19:10, 26 January 2015 by Carlos (talk | contribs) (reply)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

A template which generates a list? Isn't generally a category that generates a list or a DPL code page? We have an EditedOn/EditionDate template that doesn't generate a list. A template, say 'A cappella' doesn't generates a list of a cappella editions/works. It only specifies on a page that this edition/work is a cappella. Then a category or a DPL code script can show the list (in alphabetical title order for the first one/in 'ordermethod' order for the other one). Or am I wrong? I'm confused. Claude (talk) 17:38, 26 January 2015 (UTC)

Hi Claude. In the context of WikiMedia, a template can do a variety of thinks: it can be simply a static model for a new page (e.g. {{new composer}}); it can make calculations and return a result (e.g. {{IsNew}}); or it can return the result of a DPL query in the form of a number or a list; we have many examples of this latter use, PostedOn is just one of them). Notice that PostedOn is invoked 10 times inside of ChoralWiki:LatestScores. We could put the DPL code directly inside of that page, as you suggest, but then there would be a lot of code duplicated ten times, you see? That's one more reason to use a template: to avoid duplication of code elsewhere. :) Regards, —Carlos Email.gif 19:10, 26 January 2015 (UTC)