Template talk:Subpage style: Difference between revisions
imported>Chris Day (New page: {{subpages3}}) |
imported>Daniel Mietchen |
||
(16 intermediate revisions by 3 users not shown) | |||
Line 1: | Line 1: | ||
{{ | ==checklist poisons the subpages function== | ||
Checklist 66 seems to interfere with the function of the subpages template on the subsubpage. [[User:Chris Day|Chris Day]] [[User talk:Chris Day|(talk)]] 03:37, 6 October 2007 (CDT) | |||
==checklist66== | |||
<pre> | |||
{{#ifeq:{{SUBPAGENAME}}|Approval|[[Category:Articles to Approve]] | |||
{{#if:{{{group2|}}} | |||
|{{#if:{{{group3|}}} | |||
|[[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.*** | |||
-->{{#if:{{{cluster|}}} | |||
|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}}} | |||
|{{#if:{{{group2|}}} | |||
|{{#if:{{{group3|}}} | |||
|[[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.*** | |||
-->{{#if:{{{cluster|}}} | |||
|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}}}}.''' | |||
|}} }} }} | |||
{{!}}} | |||
</pre> | |||
==test== | |||
{| width=100% | |||
|style="background-color: #cccccc"| <nowiki>{{{basepagename|}}}</nowiki>|| {{{basepagename}}} | |||
|style="background-color: #cccccc"| <nowiki>{{{fullpagename|}}}</nowiki>|| {{{fullpagename}}} | |||
|style="background-color: #cccccc"| <nowiki>{{{pagename|}}}</nowiki>|| {{{pagename}}} | |||
|- | |||
|style="background-color: #cccccc"| <nowiki>{{{name|}}}</nowiki>|| {{{name}}} | |||
|style="background-color: #cccccc"| <nowiki>{{{subpagename|}}}</nowiki>|| {{{subpagename}}} | |||
|style="background-color: #cccccc"| <nowiki>{{{namespace|}}}</nowiki>|| {{{namespace}}} | |||
|- | |||
|style="background-color: #cccccc"| <nowiki>{{{type|}}}</nowiki> || {{{type}}} | |||
|style="background-color: #cccccc"| <nowiki>{{{pagename}}}</nowiki>||{{{pagename}}} | |||
|style="background-color: #cccccc"| <nowiki>{{{variant}}}</nowiki>||{{{variant}}} | |||
|- | |||
|style="background-color: #cccccc"| <nowiki>{{{abc}}}</nowiki>||{{{abc}}} | |||
|style="background-color: #cccccc"| <nowiki>{{{cat_check}}}</nowiki>||{{{cat_check}}} | |||
|style="background-color: #cccccc"| <nowiki>{{{status}}}</nowiki>||{{{status}}} | |||
|- | |||
|style="background-color: #cccccc"| <nowiki>{{{underlinked}}}</nowiki>||{{{underlinked}}} | |||
|style="background-color: #cccccc"| <nowiki>{{{cleanup}}}</nowiki>||{{{cleanup}}} | |||
|style="background-color: #cccccc"| <nowiki>{{{by}}}</nowiki>||{{{by}}} | |||
|- | |||
|style="background-color: #cccccc"| <nowiki>{{{group}}}</nowiki>||{{{group}}} | |||
|style="background-color: #cccccc"| || | |||
|style="background-color: #cccccc"| || | |||
|} | |||
{| width=100% | |||
|style="background-color: #cccccc"| <nowiki>{{SUBPAGENAME}}</nowiki>|| {{SUBPAGENAME}} | |||
|style="background-color: #cccccc"| <nowiki>{{FULLPAGENAME}}</nowiki>|| {{FULLPAGENAME}} | |||
|style="background-color: #cccccc"| <nowiki>{{BASEPAGENAME}}</nowiki>|| {{BASEPAGENAME}} | |||
|- | |||
|style="background-color: #cccccc"| <nowiki>{{PAGENAME}}</nowiki>|| {{PAGENAME}} | |||
|style="background-color: #cccccc"| <nowiki>[[/]]</nowiki>|| [[/]] | |||
|style="background-color: #cccccc"| <nowiki>[[../]]</nowiki>|| [[../]] | |||
|- | |||
|style="background-color: #cccccc"| <nowiki>[[../../]]</nowiki>|| [[../../]] | |||
|style="background-color: #cccccc"| <nowiki>{{/}}</nowiki>|| {{/}} | |||
|style="background-color: #cccccc"| <nowiki>{{../}}</nowiki>|| {{../}} | |||
|- | |||
|style="background-color: #cccccc"| <nowiki>{{../../}}</nowiki>|| {{../../}} | |||
|style="background-color: #cccccc"| <nowiki>{{NAMESPACE}}</nowiki>|| {{NAMESPACE}} | |||
|style="background-color: #cccccc"| || | |||
|} | |||
==Todo== | |||
*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. [[User:Chris Day|Chris Day]] [[User talk:Chris Day|(talk)]] 12:19, 18 October 2007 (CDT) | |||
==reminder== | |||
Thus <nowiki>{{ #ifexpr:.. | {{a|</nowiki>''parameters''}} | <nowiki>{{</nowiki>b |''parameters''}} }} evaluates <nowiki>{{a|</nowiki>''parameters''}} ''and'' <nowiki>{{b|</nowiki>''parameters''}} regardless of the condition. On the other hand, <nowiki>{{ {{</nowiki>#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? | |||
:<nowiki>{{ #ifexpr:.. | {{a|parameters}} | {{ #ifexpr:.. | {{b|parameters}} | {{c |parameters}} }} }} </nowiki> | |||
Can obviously be written as: | |||
:<nowiki>{{ #ifexpr:.. | {{a|parameters}} |{{ {{ #ifexpr:.. |b|c}} parameters}} }} </nowiki> | |||
Then what? Ideally I want it so that the '''''a''''' template does not expand unless used either. [[User:Chris Day|Chris Day]] [[User talk: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: | |||
:<nowiki> {{ {{ #ifexpr:.. | a | {{ #ifexpr:.. |b|c}} }} | parameters}} </nowiki> | |||
: I don't ''think'' this will trigger 5678, but I could easily be wrong... [[User:J. Noel Chiappa|J. Noel Chiappa]] 13:20, 13 March 2008 (CDT) | |||
::That's good. Thanks! [[User:Chris Day|Chris Day]] [[User talk:Chris Day|(talk)]] 15:16, 13 March 2008 (CDT) | |||
::: If that did it for you, I'm glad I could help. [[User:J. Noel Chiappa|J. Noel Chiappa]] 16:51, 13 March 2008 (CDT) | |||
== Statusbar == | |||
What about reusing the status images <nowiki>Image:Level{{{status|}}}.jpg</nowiki> instead of <nowiki>Image:Statusbar{{{status|}}}.png</nowiki>, e.g. [[:Image:Level3.jpg]] for [[:Image:Statusbar3.png]]? For an example, see {{rpl|Hypothalamus}}. <BR> | |||
Also, pl currently provides an explanation of the icon, while subpages does not. I tried to implement these changes (see [http://en.citizendium.org/wiki?title=Template:Subpage_style&curid=100031132&diff=100462940&oldid=100436757 this edit]) but seem to have missed some quirk in there. --[[User:Daniel Mietchen|Daniel Mietchen]] 12:59, 13 March 2009 (UTC) | |||
:We might even use [[CZ:Images/Extensions/ImageMap]] which would allow to link directly to the [[CZ:The_Article_Checklist#The_.27status.27_field_-_Article_status|respective definitions]] which may be helpful for people not familiar with the status system. --[[User:Daniel Mietchen|Daniel Mietchen]] 13:05, 13 March 2009 (UTC) |
Latest revision as of 07:05, 13 March 2009
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)
checklist66
{{#ifeq:{{SUBPAGENAME}}|Approval|[[Category:Articles to Approve]] {{#if:{{{group2|}}} |{{#if:{{{group3|}}} |[[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.*** -->{{#if:{{{cluster|}}} |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}}} |{{#if:{{{group2|}}} |{{#if:{{{group3|}}} |[[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.*** -->{{#if:{{{cluster|}}} |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}}}}.''' |}} }} }} {{!}}}
test
{{{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 |
Todo
- 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)
reminder
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)
- If that did it for you, I'm glad I could help. J. Noel Chiappa 16:51, 13 March 2008 (CDT)
Statusbar
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
- 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)