Template:Subpages4: Difference between revisions
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: {{{ | -->{{ #ifeq: {{#expr: {{#len:{{BASEPAGENAME}}}} > 20 }} | 1 | '''[[{{BASEPAGENAME}}|Main Article]]''' | '''[[{{BASEPAGENAME}}]]''' }}<!-- | ||
***The | ***The next piece of code adds a Link to the draft page if it exists*** | ||
--> | -->{{#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: {{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. | |||
*** The following code | |||
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> | |||
|} | |} | ||
|}<!-- | |}<!-- | ||
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}} | -->{{#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}} | }}{{#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}} | }}{{#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}} | }}{{#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}} | }}{{#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}} | }}{{#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}} | }}{{#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}} | }}{{#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}} | }}{{#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}} | }}{{#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}} | }}{{#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}} | }}{{#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}} | }}{{#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}} | }}{{#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}} | }}{{#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}} | }}{{#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
|