Template:Subpages4: Difference between revisions

From Citizendium
Jump to navigation Jump to search
imported>Chris Day
No edit summary
imported>Chris Day
(remove atttempt to incorporate signed articles flawed strategy, use experimental headers)
Line 11: Line 11:
***The following code determine if the article name is longer than twenty characters.  If so, main article is used rather than the actual name.  This means huge names are not crunched into the navigation template. At present the the expr functions to determine string length are not functional in CZ.***
***The following code determine if the article name is longer than twenty characters.  If so, main article is used rather than the actual name.  This means huge names are not crunched into the navigation template. At present the the expr functions to determine string length are not functional in CZ.***


-->{{ #ifeq: {{{pagename}}}/Signed_articles|{{BASEPAGENAME}}|<!--
-->{{ #ifeq: {{#expr: {{#len:{{BASEPAGENAME}}}} > 20 }} | 1 | '''[[{{BASEPAGENAME}}|Main Article]]''' | '''[[{{BASEPAGENAME}}]]''' }}<!--


***The following section of code is only used on signed articles to set name and draft links at the top of the navigation box. ***
***The next piece of code adds a Link to the draft page if it exists***


-->{{ #ifeq: {{#expr: {{#len:{{{pagename}}}}} > 20 }} | 1 |
-->{{#ifexist:{{BASEPAGENAME}}/Draft|<br><font size=1>''[[{{BASEPAGENAME}}/Draft|Draft Page]]''</font>}}<!--
'''[[{{{pagename}}}|Main Article]]''' |'''[[{{{pagename}}}|{{{pagename}}}]]''' }}{{#ifexist:{{{pagename}}}/Draft|<br><font size=1>''[[{{{pagename}}}/Draft|Draft Page]]''</font>}}|<!--
 
***The following section of code is used on all pages except signed articles to set name and draft links at the top of the navigation box.***
 
-->{{ #ifeq: {{#expr: {{#len:{{BASEPAGENAME}}}} > 20 }} | 1 | '''[[{{BASEPAGENAME}}|Main Article]]''' | '''[[{{BASEPAGENAME}}]]''' }}{{#ifexist:{{BASEPAGENAME}}/Draft|<br><font size=1>''[[{{BASEPAGENAME}}/Draft|Draft Page]]''</font>}} }}<!--


***The following code identifies the subpages in the Template:Subpage list that are tagged as Default. It adds those buttons in the numerical sequence regardless of whether the subpage exists or not.  
***The following code identifies the subpages in the Template:Subpage list that are tagged as Default. It adds those buttons in the numerical sequence regardless of whether the subpage exists or not.  


The subpage list row template is used to create the table cell for each specific button. Also, if the current page is the subpage, it uses the "button on" style template, otherwise the "button off" style template is used.***
The subpage list row template is used to create the table cell for each specific button. Also, if the current page is the subpage, it uses the "button on" style template, otherwise the "button off" style template is used.***
-->{{ #ifeq: {{{pagename}}}/Signed_articles|{{BASEPAGENAME}}|<!--
*** The following code sets default buttons for the signed articles only. ***
-->{{ #ifeq: {{Subpage list|button=1C}}|Default|{{subpage_list_row2|{{Subpage list|button=1A}}|{{Subpage list|button=1B}} }} }}<nowiki>
</nowiki>{{ #ifeq: {{Subpage list|button=2C}}|Default|{{subpage_list_row2|{{Subpage list|button=2A}}|{{Subpage list|button=2B}} }} }}<nowiki>
</nowiki>{{ #ifeq: {{Subpage list|button=3C}}|Default|{{subpage_list_row2|{{Subpage list|button=3A}}|{{Subpage list|button=3B}} }} }}<nowiki>
</nowiki>{{ #ifeq: {{Subpage list|button=4C}}|Default|{{subpage_list_row2|{{Subpage list|button=4A}}|{{Subpage list|button=4B}} }} }}<nowiki>
</nowiki>{{ #ifeq: {{Subpage list|button=5C}}|Default|{{subpage_list_row2|{{Subpage list|button=5A}}|{{Subpage list|button=5B}} }} }}<nowiki>
</nowiki>{{ #ifeq: {{Subpage list|button=6C}}|Default|{{subpage_list_row2|{{Subpage list|button=6A}}|{{Subpage list|button=6B}} }} }}<nowiki>
</nowiki>{{ #ifeq: {{Subpage list|button=7C}}|Default|{{subpage_list_row2|{{Subpage list|button=7A}}|{{Subpage list|button=7B}} }} }}<nowiki>
</nowiki>{{ #ifeq: {{Subpage list|button=8C}}|Default|{{subpage_list_row2|{{Subpage list|button=8A}}|{{Subpage list|button=8B}} }} }}<nowiki>
</nowiki>{{ #ifeq: {{Subpage list|button=9C}}|Default|{{subpage_list_row2|{{Subpage list|button=9A}}|{{Subpage list|button=9B}} }} }}<nowiki>
</nowiki>{{ #ifeq: {{Subpage list|button=10C}}|Default|{{subpage_list_row2|{{Subpage list|button=10A}}|{{Subpage list|button=10B}} }} }}<nowiki>
</nowiki>{{ #ifeq: {{Subpage list|button=11C}}|Default|{{subpage_list_row2|{{Subpage list|button=11A}}|{{Subpage list|button=11B}} }} }}<nowiki>
</nowiki>{{ #ifeq: {{Subpage list|button=12C}}|Default|{{subpage_list_row2|{{Subpage list|button=12A}}|{{Subpage list|button=12B}} }} }}<nowiki>
</nowiki>{{ #ifeq: {{Subpage list|button=13C}}|Default|{{subpage_list_row2|{{Subpage list|button=13A}}|{{Subpage list|button=13B}} }} }}<nowiki>
</nowiki>{{ #ifeq: {{Subpage list|button=14C}}|Default|{{subpage_list_row2|{{Subpage list|button=14N}}|{{Subpage list|button=14B}} }} }}<nowiki>
</nowiki>{{ #ifeq: {{Subpage list|button=15C}}|Default|{{subpage_list_row2|{{Subpage list|button=15A}}|{{Subpage list|button=15B}} }} }}<nowiki>
</nowiki>{{ #ifeq: {{Subpage list|button=16C}}|Default|{{subpage_list_row2|{{Subpage list|button=16A}}|{{Subpage list|button=16B}} }} }}|<!--
*** The following code sets default buttons for all pages except for the signed articles. ***


-->{{ #ifeq: {{Subpage list|button=1C}}|Default|{{subpage_list_row|{{Subpage list|button=1A}}|{{Subpage list|button=1B}} }} }}<nowiki>
-->{{ #ifeq: {{Subpage list|button=1C}}|Default|{{subpage_list_row|{{Subpage list|button=1A}}|{{Subpage list|button=1B}} }} }}<nowiki>
Line 95: Line 51:
</nowiki>{{ #ifeq: {{Subpage list|button=15C}}|Default|{{subpage_list_row|{{Subpage list|button=15A}}|{{Subpage list|button=15B}} }} }}<nowiki>
</nowiki>{{ #ifeq: {{Subpage list|button=15C}}|Default|{{subpage_list_row|{{Subpage list|button=15A}}|{{Subpage list|button=15B}} }} }}<nowiki>


</nowiki>{{ #ifeq: {{Subpage list|button=16C}}|Default|{{subpage_list_row|{{Subpage list|button=16A}}|{{Subpage list|button=16B}} }} }} }}<!--
</nowiki>{{ #ifeq: {{Subpage list|button=16C}}|Default|{{subpage_list_row|{{Subpage list|button=16A}}|{{Subpage list|button=16B}} }} }}<!--
 
*** The following code identifies the subpages in the Template:Subpage list that are tagged as optional. If the subpage exists it adds the button after the default buttons in the numerical sequence defined in the subpage list template.
 
Again, the subpage list row template is used to create the table cell for each specific button. Also, if the current page is the subpage, it uses the "button on" style template, otherwise the "button off" style template is used. ***
 
-->{{ #ifeq: {{{pagename}}}/Signed_articles|{{BASEPAGENAME}}|<!--
 
*** The following code sets optional buttons for the signed articles only. ***
 
 
-->{{ #ifeq: {{Subpage list|button=1C}}|Optional|{{#ifexist:{{{{pagename}}}}/{{Subpage list|button=1A}}|{{subpage_list_row2|{{Subpage list|button=1A}}|{{Subpage list|button=1B}} }} }} }}<nowiki>
 
</nowiki>{{ #ifeq: {{Subpage list|button=2C}}|Optional|{{#ifexist:{{{{pagename}}}}/{{Subpage list|button=2A}}|{{subpage_list_row2|{{Subpage list|button=2A}}|{{Subpage list|button=2B}} }} }} }}<nowiki>
 
</nowiki>{{ #ifeq: {{Subpage list|button=3C}}|Optional|{{#ifexist:{{{{pagename}}}}/{{Subpage list|button=3A}}|{{subpage_list_row2|{{Subpage list|button=3A}}|{{Subpage list|button=3B}} }} }} }}<nowiki>
 
</nowiki>{{ #ifeq: {{Subpage list|button=4C}}|Optional|{{#ifexist:{{{{pagename}}}}/{{Subpage list|button=4A}}|{{subpage_list_row2|{{Subpage list|button=4A}}|{{Subpage list|button=4B}} }} }} }}<nowiki>
 
</nowiki>{{ #ifeq: {{Subpage list|button=5C}}|Optional|{{#ifexist:{{{{pagename}}}}/{{Subpage list|button=5A}}|{{subpage_list_row2|{{Subpage list|button=5A}}|{{Subpage list|button=5B}} }} }} }}<nowiki>
 
</nowiki>{{ #ifeq: {{Subpage list|button=6C}}|Optional|{{#ifexist:{{{{pagename}}}}/{{Subpage list|button=6A}}|{{subpage_list_row2|{{Subpage list|button=6A}}|{{Subpage list|button=6B}} }} }} }}<nowiki>


</nowiki>{{ #ifeq: {{Subpage list|button=7C}}|Optional|{{#ifexist:{{{{pagename}}}}/{{Subpage list|button=7A}}|{{subpage_list_row2|{{Subpage list|button=7A}}|{{Subpage list|button=7B}} }} }} }}<nowiki>
***The following code identifies the subpages in the Template:Subpage list that are tagged as optional. If the subpage exists it adds the button after the default buttons in the numerical sequence defined in the subpage list template.  
 
</nowiki>{{ #ifeq: {{Subpage list|button=8C}}|Optional|{{#ifexist:{{{{pagename}}}}/{{Subpage list|button=8A}}|{{subpage_list_row2|{{Subpage list|button=8A}}|{{Subpage list|button=8B}} }} }} }}<nowiki>
 
</nowiki>{{ #ifeq: {{Subpage list|button=9C}}|Optional|{{#ifexist:{{{{pagename}}}}/{{Subpage list|button=9A}}|{{subpage_list_row2|{{Subpage list|button=9A}}|{{Subpage list|button=9B}} }} }} }}<nowiki>
 
</nowiki>{{ #ifeq: {{Subpage list|button=10C}}|Optional|{{#ifexist:{{{{pagename}}}}/{{Subpage list|button=10A}}|{{subpage_list_row2|{{Subpage list|button=10A}}|{{Subpage list|button=10B}} }} }} }}<nowiki>
 
</nowiki>{{ #ifeq: {{Subpage list|button=11C}}|Optional|{{#ifexist:{{{{pagename}}}}/{{Subpage list|button=11A}}|{{subpage_list_row2|{{Subpage list|button=11A}}|{{Subpage list|button=11B}} }} }} }}<nowiki>
 
</nowiki>{{ #ifeq: {{Subpage list|button=12C}}|Optional|{{#ifexist:{{{{pagename}}}}/{{Subpage list|button=12A}}|{{subpage_list_row2|{{Subpage list|button=12A}}|{{Subpage list|button=12B}} }} }} }}<nowiki>
 
</nowiki>{{ #ifeq: {{Subpage list|button=13C}}|Optional|{{#ifexist:{{{{pagename}}}}/{{Subpage list|button=13A}}|{{subpage_list_row2|{{Subpage list|button=13A}}|{{Subpage list|button=13B}} }} }} }}<nowiki>
 
</nowiki>{{ #ifeq: {{Subpage list|button=14C}}|Optional|{{#ifexist:{{{{pagename}}}}/{{Subpage list|button=14A}}|{{subpage_list_row2|{{Subpage list|button=14N}}|{{Subpage list|button=14B}} }} }} }}<nowiki>
 
</nowiki>{{ #ifeq: {{Subpage list|button=15C}}|Optional|{{#ifexist:{{{{pagename}}}}/{{Subpage list|button=15A}}|{{subpage_list_row2|{{Subpage list|button=15A}}|{{Subpage list|button=15B}} }} }} }}<nowiki>
 
</nowiki>{{ #ifeq: {{Subpage list|button=16C}}|Optional|{{#ifexist:{{{{pagename}}}}/{{Subpage list|button=16A}}|{{subpage_list_row2|{{Subpage list|button=16A}}|{{Subpage list|button=16B}} }} }} }}|<!--
 
 
*** The following code sets optional buttons for all pages except for the signed articles. ***


Again, the subpage list row template is used to create the table cell for each specific button. Also, if the current page is the subpage, it uses the "button on" style template, otherwise the "button off" style template is used.***


-->{{ #ifeq: {{Subpage list|button=1C}}|Optional|{{#ifexist:{{BASEPAGENAME}}/{{Subpage list|button=1A}}|{{subpage_list_row|{{Subpage list|button=1A}}|{{Subpage list|button=1B}} }} }} }}<nowiki>
-->{{ #ifeq: {{Subpage list|button=1C}}|Optional|{{#ifexist:{{BASEPAGENAME}}/{{Subpage list|button=1A}}|{{subpage_list_row|{{Subpage list|button=1A}}|{{Subpage list|button=1B}} }} }} }}<nowiki>
Line 172: Line 87:
</nowiki>{{ #ifeq: {{Subpage list|button=15C}}|Optional|{{#ifexist:{{BASEPAGENAME}}/{{Subpage list|button=15A}}|{{subpage_list_row|{{Subpage list|button=15A}}|{{Subpage list|button=15B}} }} }} }}<nowiki>
</nowiki>{{ #ifeq: {{Subpage list|button=15C}}|Optional|{{#ifexist:{{BASEPAGENAME}}/{{Subpage list|button=15A}}|{{subpage_list_row|{{Subpage list|button=15A}}|{{Subpage list|button=15B}} }} }} }}<nowiki>


</nowiki>{{ #ifeq: {{Subpage list|button=16C}}|Optional|{{#ifexist:{{BASEPAGENAME}}/{{Subpage list|button=16A}}|{{subpage_list_row|{{Subpage list|button=16A}}|{{Subpage list|button=16B}} }} }} }} }}
</nowiki>{{ #ifeq: {{Subpage list|button=16C}}|Optional|{{#ifexist:{{BASEPAGENAME}}/{{Subpage list|button=16A}}|{{subpage_list_row|{{Subpage list|button=16A}}|{{Subpage list|button=16B}} }} }} }}
|-
|-
|<center><font size=1>''[[CZ:Subpage Pilot|About Clusters]]''</font></center>
|<center><font size=1>''[[CZ:Subpage Pilot|About Clusters]]''</font></center>
|-
|-
|<!--
|<center><font color="#333333" size=1>[[{{BASEPAGENAME}}/Unused|Unused subpages]]</font></center>
 
Following code links to the unused article subpage.
 
-->{{ #ifeq: {{{pagename}}}/Signed_articles|{{BASEPAGENAME}}|<center><font color="#333333" size=1>[[{{{pagename}}}/Unused|Unused subpages]]</font></center>|<center><font color="#333333" size=1>[[{{BASEPAGENAME}}/Unused|Unused subpages]]</font></center>}}
|}
|}
|}<!--
|}<!--
Line 186: Line 97:
***The following code is to place the correct header template above each article subpage***
***The following code is to place the correct header template above each article subpage***


-->{{#ifeq:{{PAGENAME}} |{{BASEPAGENAME}}/{{Subpage list|button=1A}}|{{ {{Subpage list|button=1A}} header}}  
-->{{#ifeq:{{PAGENAME}} |{{BASEPAGENAME}}/{{Subpage list|button=1A}}|{{ {{Subpage list|button=1A}} header2|group= {{{group|}}}|group2= {{{group2|}}}|group3={{{group3|}}}|abc={{{abc|}}}|approved= {{{approved|}}} }}  


}}{{#ifeq:{{PAGENAME}} |{{BASEPAGENAME}}/{{Subpage list|button=2A}}|{{ {{Subpage list|button=2A}} header}}  
}}{{#ifeq:{{PAGENAME}} |{{BASEPAGENAME}}/{{Subpage list|button=2A}}|{{ {{Subpage list|button=2A}} header2|group= {{{group|}}}|group2= {{{group2|}}}|group3={{{group3|}}}|abc={{{abc|}}}|approved= {{{approved|}}} }}  


}}{{#ifeq:{{PAGENAME}} |{{BASEPAGENAME}}/{{Subpage list|button=3A}}|{{ {{Subpage list|button=3A}} header}}  
}}{{#ifeq:{{PAGENAME}} |{{BASEPAGENAME}}/{{Subpage list|button=3A}}|{{ {{Subpage list|button=3A}} header2|group= {{{group|}}}|group2= {{{group2|}}}|group3={{{group3|}}}|abc={{{abc|}}}|approved= {{{approved|}}} }}  


}}{{#ifeq:{{PAGENAME}} |{{BASEPAGENAME}}/{{Subpage list|button=4A}}|{{ {{Subpage list|button=4A}} header}}  
}}{{#ifeq:{{PAGENAME}} |{{BASEPAGENAME}}/{{Subpage list|button=4A}}|{{ {{Subpage list|button=4A}} header2|group= {{{group|}}}|group2= {{{group2|}}}|group3={{{group3|}}}|abc={{{abc|}}}|approved= {{{approved|}}} }}  


}}{{#ifeq:{{PAGENAME}} |{{BASEPAGENAME}}/{{Subpage list|button=5A}}|{{ {{Subpage list|button=5A}} header}}  
}}{{#ifeq:{{PAGENAME}} |{{BASEPAGENAME}}/{{Subpage list|button=5A}}|{{ {{Subpage list|button=5A}} header2|group= {{{group|}}}|group2= {{{group2|}}}|group3={{{group3|}}}|abc={{{abc|}}}|approved= {{{approved|}}} }}  


}}{{#ifeq:{{PAGENAME}} |{{BASEPAGENAME}}/{{Subpage list|button=6A}}|{{ {{Subpage list|button=6A}} header}}  
}}{{#ifeq:{{PAGENAME}} |{{BASEPAGENAME}}/{{Subpage list|button=6A}}|{{ {{Subpage list|button=6A}} header2|group= {{{group|}}}|group2= {{{group2|}}}|group3={{{group3|}}}|abc={{{abc|}}}|approved= {{{approved|}}} }}  


}}{{#ifeq:{{PAGENAME}} |{{BASEPAGENAME}}/{{Subpage list|button=7A}}|{{ {{Subpage list|button=7A}} header}}  
}}{{#ifeq:{{PAGENAME}} |{{BASEPAGENAME}}/{{Subpage list|button=7A}}|{{ {{Subpage list|button=7A}} header2|group= {{{group|}}}|group2= {{{group2|}}}|group3={{{group3|}}}|abc={{{abc|}}}|approved= {{{approved|}}} }}  


}}{{#ifeq:{{PAGENAME}} |{{BASEPAGENAME}}/{{Subpage list|button=8A}}|{{ {{Subpage list|button=8A}} header}}  
}}{{#ifeq:{{PAGENAME}} |{{BASEPAGENAME}}/{{Subpage list|button=8A}}|{{ {{Subpage list|button=8A}} header2|group= {{{group|}}}|group2= {{{group2|}}}|group3={{{group3|}}}|abc={{{abc|}}}|approved= {{{approved|}}} }}  


}}{{#ifeq:{{PAGENAME}} |{{BASEPAGENAME}}/{{Subpage list|button=9A}}|{{ {{Subpage list|button=9A}} header}}  
}}{{#ifeq:{{PAGENAME}} |{{BASEPAGENAME}}/{{Subpage list|button=9A}}|{{ {{Subpage list|button=9A}} header2|group= {{{group|}}}|group2= {{{group2|}}}|group3={{{group3|}}}|abc={{{abc|}}}|approved= {{{approved|}}} }}  


}}{{#ifeq:{{PAGENAME}} |{{BASEPAGENAME}}/{{Subpage list|button=10A}}|{{ {{Subpage list|button=10A}} header}}  
}}{{#ifeq:{{PAGENAME}} |{{BASEPAGENAME}}/{{Subpage list|button=10A}}|{{ {{Subpage list|button=10A}} header2|group= {{{group|}}}|group2= {{{group2|}}}|group3={{{group3|}}}|abc={{{abc|}}}|approved= {{{approved|}}} }}  


}}{{#ifeq:{{PAGENAME}} |{{BASEPAGENAME}}/{{Subpage list|button=11A}}|{{ {{Subpage list|button=11A}} header}}  
}}{{#ifeq:{{PAGENAME}} |{{BASEPAGENAME}}/{{Subpage list|button=11A}}|{{ {{Subpage list|button=11A}} header2|group= {{{group|}}}|group2= {{{group2|}}}|group3={{{group3|}}}|abc={{{abc|}}}|approved= {{{approved|}}} }}  


}}{{#ifeq:{{PAGENAME}} |{{BASEPAGENAME}}/{{Subpage list|button=12A}}|{{ {{Subpage list|button=12A}} header}}  
}}{{#ifeq:{{PAGENAME}} |{{BASEPAGENAME}}/{{Subpage list|button=12A}}|{{ {{Subpage list|button=12A}} header2|group= {{{group|}}}|group2= {{{group2|}}}|group3={{{group3|}}}|abc={{{abc|}}}|approved= {{{approved|}}} }}  


}}{{#ifeq:{{PAGENAME}} |{{BASEPAGENAME}}/{{Subpage list|button=13A}}|{{ {{Subpage list|button=13A}} header}}  
}}{{#ifeq:{{PAGENAME}} |{{BASEPAGENAME}}/{{Subpage list|button=13A}}|{{ {{Subpage list|button=13A}} header2|group= {{{group|}}}|group2= {{{group2|}}}|group3={{{group3|}}}|abc={{{abc|}}}|approved= {{{approved|}}} }}  


}}{{#ifeq:{{PAGENAME}} |{{BASEPAGENAME}}/{{Subpage list|button=14A}}|{{ {{Subpage list|button=14A}} header}}  
}}{{#ifeq:{{PAGENAME}} |{{BASEPAGENAME}}/{{Subpage list|button=14A}}|{{ {{Subpage list|button=14A}} header2|group= {{{group|}}}|group2= {{{group2|}}}|group3={{{group3|}}}|abc={{{abc|}}}|approved= {{{approved|}}} }}  


}}{{#ifeq:{{PAGENAME}} |{{BASEPAGENAME}}/{{Subpage list|button=15A}}|{{ {{Subpage list|button=15A}} header}}  
}}{{#ifeq:{{PAGENAME}} |{{BASEPAGENAME}}/{{Subpage list|button=15A}}|{{ {{Subpage list|button=15A}} header2|group= {{{group|}}}|group2= {{{group2|}}}|group3={{{group3|}}}|abc={{{abc|}}}|approved= {{{approved|}}} }}  


}}{{#ifeq:{{PAGENAME}} |{{BASEPAGENAME}}/{{Subpage list|button=16A}}|{{ {{Subpage list|button=16A}} header}} }}
}}{{#ifeq:{{PAGENAME}} |{{BASEPAGENAME}}/{{Subpage list|button=16A}}|{{ {{Subpage list|button=16A}} header2|group= {{{group|}}}|group2= {{{group2|}}}|group3={{{group3|}}}|abc={{{abc|}}}|approved= {{{approved|}}} }} }}

Revision as of 10:52, 23 July 2007