Re: [templates] Listing pages

On Wed, Dec 12, 2012 at 1:27 PM, frozenice <> wrote:

> 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:
> 2012Dec/0157.html<>
> 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).

Whew, that could get complicated quickly.  Do we know of use cases for the
template today that would require more than the two options? If we don't,
I'd prefer to stay with the checkbox.

> 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.

That's a great idea in general.

> > 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, 19 December 2012 00:48:55 UTC