Difference between revisions of "Template talk:PostedOn"

From ChoralWiki
Jump to navigation Jump to search
m
(reply)
 
Line 4: Line 4:
 
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?
 
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. [[User:Claude T|Claude]] ([[User talk:Claude T|talk]]) 17:38, 26 January 2015 (UTC)
 
I'm confused. [[User:Claude T|Claude]] ([[User talk:Claude T|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. {{tl|new composer}}); it can make calculations and return a result (e.g. {{tl|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, —[[User:Carlos|Carlos]] [[File:Email.gif|link=User talk:Carlos]] 19:10, 26 January 2015 (UTC)

Latest revision as of 19:10, 26 January 2015

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)