Template talk:Subpage style

From Citizendium
Jump to navigation Jump to search

checklist poisons the subpages function

Checklist 66 seems to interfere with the function of the subpages template on the subsubpage. Chris Day (talk) 03:37, 6 October 2007 (CDT)


{{#ifeq:{{SUBPAGENAME}}|Approval|[[Category:Articles to Approve]]
                    |[[Category:{{{group}}} to Approve]][[Category:{{{group2}}} to Approve]][[Category:{{{group3}}} to Approve]]
                    |[[Category:{{{group}}} to Approve]][[Category:{{{group2}}} to Approve]]}}
               |[[Category:{{{group}}} to Approve]]}} |}}
{{{!}}class=noprint width=95% border="0" cellpadding="5" cellspacing="0" style="text-align: left; border-bottom:2px solid #aaaaaa; border-top:2px solid #eeeeee; border-left:2px solid #bbbbbb; border-right:2px solid #eeeeee; border-collapse:collapse"
{{!}}style="background:lightgreen"{{!}} [[Image:toapprove.png|left|50px]] '''[[User:{{{ToA editor}}}|{{{ToA editor}}}]]''' <!--

***This determines what is up for approval; the whole cluster, a subpage, the article or both.***

              |has nominated the whole '''{{BASEPAGENAME}} Cluster''' for approval including [{{{article url}}} {{#if:{{{now|}}}|the version dated {{{now}}}|this version}}] of the article as well as all the subpages. 
              |{{#if:{{{article url|}}}
                    |{{#if:{{{subpage url|}}}
                            |has nominated [{{{article url}}} {{#if:{{{now|}}}|the version dated {{{now}}}|this version}}] of the article as well as [{{{subpage url}}} one subpage] for approval.
                            |has nominated [{{{article url}}} {{#if:{{{now|}}}|the version dated {{{now}}}|this version}}] of this article for approval.}}
                    |{{#if:{{{subpage url|}}}
                            |has nominated [{{{subpage url}}} {{#if:{{{now|}}}|the version dated {{{now}}}|this version}}] of a subpage in this cluster for approval.
                            |will be nominating this article for approval in the near future. }} }} }} <!--

***This code adds the approval editors names, upto four can be added.***

-->{{#if:{{{ToA editor2|}}}
          |{{#if:{{{ToA editor3|}}}
               |Two other editors currently support the approval ([[User:{{{ToA editor2}}}|{{{ToA editor2}}}]] and [[User:{{{ToA editor3}}}|{{{ToA editor3}}}]]).
               |One other editor currently supports the approval ([[User:{{{ToA editor2}}}|{{{ToA editor2}}}]]).}} 
          |Other editors may also sign to support approval.}} <!--

***This code adds the workgroup names, upto three can be used from the metadata page.***

-->The {{#if:{{{group}}}
                    |[[CZ:{{{group}}} Workgroup|{{{group}}} Workgroup]], [[CZ:{{{group2}}} Workgroup|{{{group2}}} Workgroup]] and [[CZ:{{{group3}}} Workgroup|{{{group3}}} Workgroup]] are
                    |[[CZ:{{{group}}} Workgroup|{{{group}}} Workgroup]] and [[CZ:{{{group2}}} Workgroup|{{{group2}}} Workgroup]] are}}
               |[[CZ:{{{group}}} Workgroup|{{{group}}} Workgroup]] is}}
          |an unknown workgroup is}} overseeing this approval. <!--

***This code adds the date for approval unless no url has been specificed.***

              |Unless this notice is removed, the article will be approved on  '''{{#if: {{{date}}}|{{{date}}}|{{AddDays|3}}}}.'''  
              |{{#if:{{{article url|}}}
                    |Unless this notice is removed, the article will be approved on  '''{{#if: {{{date}}}|{{{date}}}|{{AddDays|3}}}}.'''
                    |{{#if:{{{subpage url|}}}
                            |Unless this notice is removed, the article will be approved on  '''{{#if: {{{date}}}|{{{date}}}|{{AddDays|3}}}}.'''
                            |}} }} }}


{{{basepagename|}}} {{{basepagename}}} {{{fullpagename|}}} {{{fullpagename}}} {{{pagename|}}} {{{pagename}}}
{{{name|}}} {{{name}}} {{{subpagename|}}} {{{subpagename}}} {{{namespace|}}} {{{namespace}}}
{{{type|}}} {{{type}}} {{{pagename}}} {{{pagename}}} {{{variant}}} {{{variant}}}
{{{abc}}} {{{abc}}} {{{cat_check}}} {{{cat_check}}} {{{status}}} {{{status}}}
{{{underlinked}}} {{{underlinked}}} {{{cleanup}}} {{{cleanup}}} {{{by}}} {{{by}}}
{{{group}}} {{{group}}}
{{SUBPAGENAME}} Subpage style {{FULLPAGENAME}} Template talk:Subpage style {{BASEPAGENAME}} Subpage style
{{PAGENAME}} Subpage style [[/]] Template talk:Subpage style/ [[../]] [[../]]
[[../../]] [[../../]] {{/}} Template talk:Subpage style/ {{../}} {{../}}
{{../../}} {{../../}} {{NAMESPACE}} Template talk


  • Need to have a comparison check on all the fields. For example, article name must equal pagename field. Approving editor field must be blank if status is one. Or if it is approved then status must be one. etc. Chris Day (talk) 12:19, 18 October 2007 (CDT)


Thus {{ #ifexpr:.. | {{a|parameters}} | {{b |parameters}} }} evaluates {{a|parameters}} and {{b|parameters}} regardless of the condition. On the other hand, {{ {{#ifexpr:..|a|b}} | parameters }} just evaluates the expression for the template name (by evaluating the condition, and resulting in a or b) and the parameters, and the actually included template.

See also ParserFunctions#Code_execution.

How is this written when using nested parser functions?

{{ #ifexpr:.. | {{a|parameters}} | {{ #ifexpr:.. | {{b|parameters}} | {{c |parameters}} }} }}

Can obviously be written as:

{{ #ifexpr:.. | {{a|parameters}} |{{ {{ #ifexpr:.. |b|c}} parameters}} }}

Then what? Ideally I want it so that the a template does not expand unless used either. Chris Day (talk) 09:19, 13 March 2008 (CDT)

I'm not sure if this is what you're looking for, but you can take the basic idea at the top of the section (to evaluate the template name, and then apply the evaluated name to a single instance of the parameters) one step further, viz:
{{ {{ #ifexpr:.. | a | {{ #ifexpr:.. |b|c}} }} | parameters}}
I don't think this will trigger 5678, but I could easily be wrong... J. Noel Chiappa 13:20, 13 March 2008 (CDT)
That's good. Thanks! Chris Day (talk) 15:16, 13 March 2008 (CDT)
If that did it for you, I'm glad I could help. J. Noel Chiappa 16:51, 13 March 2008 (CDT)


What about reusing the status images Image:Level{{{status|}}}.jpg instead of Image:Statusbar{{{status|}}}.png, e.g. Image:Level3.jpg for Image:Statusbar3.png? For an example, see

  • Developing Article Hypothalamus: A part of the mammalian brain located below the thalamus, forming the major portion of the ventral region of the diencephalon. [e].

Also, pl currently provides an explanation of the icon, while subpages does not. I tried to implement these changes (see this edit) but seem to have missed some quirk in there. --Daniel Mietchen 12:59, 13 March 2009 (UTC)

We might even use CZ:Images/Extensions/ImageMap which would allow to link directly to the respective definitions which may be helpful for people not familiar with the status system. --Daniel Mietchen 13:05, 13 March 2009 (UTC)