I am trying to automate composer pages, several of which have >50 works in a subcategory.
Is there a way to arrange columns below {{#SortWorks:}}?
I created a dpl script with columns (see http://www.cpdl.org/wiki/index.php/Oliver_Holden), but unfortunately it isn't accepted as automation -- the Recent Additions dialog still appears. (or could I modify the dpl script?)
Thank you.
Barry Johnston
Automating composer pages: Columns
Automating composer pages: Columns
Barry Johnston
Gunnison, U. S. A.
Gunnison, U. S. A.
Re: Automating composer pages: Columns
The automated add work process is unable to recognize whether a composer page is automated already, as different automation tools exist (e.g., SortWorks, DPL) and others mat be added in the future. So, the Recent Additions template is added anyway, to stay on the safe side. The template can be easily removed then. Pages where the Recent Additions template is present are traced through a dedicated category, so it is also easy to locate any instances not removed yet.Bcjohnston523 wrote:the Recent Additions dialog still appears
Currently, columns are set by {{#SortWorks:}} as follows:Bcjohnston523 wrote:Is there a way to arrange columns below {{#SortWorks:}}?
- if there are up to 20 items to list, one column is used;
- if there are 21 to 40 items to list, two columns are used;
- if there are more than 40 items to list, three columns are used.
The above rules can be changed, however this requires to modify the php script. I can do that.
Max
Re: Automating composer pages: Columns
Thanks, Max! That helps a lot.
I have noticed that the length of work titles varies a lot. So it would help me if the editor could set the number of columns in {{#SortWorks:}}, perhaps defaulting to the current rules.
Thanks again.
Barry
I have noticed that the length of work titles varies a lot. So it would help me if the editor could set the number of columns in {{#SortWorks:}}, perhaps defaulting to the current rules.
Thanks again.
Barry
Barry Johnston
Gunnison, U. S. A.
Gunnison, U. S. A.
Re: Automating composer pages: Columns
What about a format like this:
{{#SortWorks: <subcategory> |<number of columns>}}
So, for example, {{#SortWorks:1800 works|4}} will list all works published in 1800, distributed on four columns.
If the subcategory is not specified, all composer's works are considered. If the number of columns is not specified, the default rules apply.
Makes sense?
Max
{{#SortWorks: <subcategory> |<number of columns>}}
So, for example, {{#SortWorks:1800 works|4}} will list all works published in 1800, distributed on four columns.
If the subcategory is not specified, all composer's works are considered. If the number of columns is not specified, the default rules apply.
Makes sense?
Max
Re: Automating composer pages: Columns
That makes sense, although
{{#SortWorks:<subcategory>|cols=<number of columns>}}
might be more consistent with other functions and templates.
But if you've already made the change, go with it.
Thanks!
Barry
{{#SortWorks:<subcategory>|cols=<number of columns>}}
might be more consistent with other functions and templates.
But if you've already made the change, go with it.
Thanks!
Barry
Barry Johnston
Gunnison, U. S. A.
Gunnison, U. S. A.
Re: Automating composer pages: Columns
Done, using the format {{#SortWorks:<subcategory>|cols=<number of columns>}}.
This page:
http://www.cpdl.org/wiki/index.php/Andrea_Gabrieli
already makes use of it, so that secular works are distributed on three columns, like sacred works (by default secular works would be distributed on two columns instead).
Please try to use it, and let me know about any glitches.
Max
This page:
http://www.cpdl.org/wiki/index.php/Andrea_Gabrieli
already makes use of it, so that secular works are distributed on three columns, like sacred works (by default secular works would be distributed on two columns instead).
Please try to use it, and let me know about any glitches.
Max
Re: Automating composer pages: Columns
Thank you very much!
This helps a bunch.
I've tried this on several pages, and it works well (better distribution of columns than my dpl script).
Is this documented somewhere in CPDL?
Barry
This helps a bunch.
I've tried this on several pages, and it works well (better distribution of columns than my dpl script).
Is this documented somewhere in CPDL?
Barry
Barry Johnston
Gunnison, U. S. A.
Gunnison, U. S. A.
Re: Automating composer pages: Columns
Yes, of course:Bcjohnston523 wrote:Is this documented somewhere in CPDL?
http://www.cpdl.org/wiki/index.php/Help ... oser_pages
I updated this help page immediately after having activated the new cols= function. The description can be improved, of course, as I'm not a native English speaker.
Max