Re: [templates] Listing pages

Sounds good! Some remarks inline... :)

On 11.12.2012 23:55, Scott Rowe wrote:
> First, we pull the guts out of the Template:API_Listing and make a new Template:Concept_Listing:
> {{#if:{{{Query|}}}|{{#ask:{{{Query|}}}|?Page_Title|?Summary|link=none|format=template|template=Summary_Table_Body|introtemplate=Summary_Table_Header{{#ifeq:{{{Use_page_title|}}}|Yes|_Pages|}}|outrotemplate=Summary_Table_Footer|searchlabel=See
> more pages...}}|}}
> {{#ifeq:{{{List_all_subpages|}}}|Yes|
> ==Subpages==
> {{Special:PrefixIndex/{{PAGENAME}}/}}|}}
> Now, I forget, does the following piece go in the above somewhere?
> {{Concept_Listing|Query={{{Query|}}}|Use_page_title={{{Use_page_title|}}}

That piece (which is missing }} at the end btw) calls the above one. It sits in Form:API_Listing disguised as:
{{{for template|API_Listing}}}

 > ! Use page title (instead of API_Name):
 > | <nowiki>{{{field|Use_page_title|input type=checkbox}}}</nowiki>

As this is going to be included everywhere, should we leave "API Name" as the default value or change it?
The label would have to be adjusted if the default value is changed and we propably would need to fix up articles.
Note that it's currently not possible to pass an arbitrary title to the table header template, as I outlined earlier:

Or, we could have more than two values if we change my #ifeq into a #switch and provide a select-box instead of a checkbox
in the form, but that would also require more table header templates (with different suffixes, like _Pages).
We could reduce redundant code if we put in another nested template, but as the summary table header is only 3 lines
of wiki code, that shouldn't be necessary.
The select-box would be fueled by a property (Property:Concept_Listing_Main_Column_Titles or such :D).
We could assume "API Name" if nothing is selected yet, so we don't need to fix up articles.

 > We replace the above with a call to the Concept_Listing form template
 > {{{for template|API_listing}}
 > {{Concept_Listing_Form_Section}}

Why did you move {{{end template}}} into the form section template? It's the counterpart of {{for template|}},
so those two should be on the same level (at least for readability, Semantic Forms might handle it either way).

Received on Wednesday, 12 December 2012 21:28:26 UTC