Template:Subpages4: Difference between revisions

From Citizendium
Jump to navigation Jump to search
imported>Chris Day
(rv further)
imported>Chris Day
(rv further)
Line 17: Line 17:
-->{{ #ifeq: {{../../Info|info=pagename}}/Signed articles|{{BASEPAGENAME}}|{{#ifexist:{{../../Info|info=pagename}}/Draft|<br><font size=1>''[[{{../../Info|info=pagename}}/Draft|Draft Page]]''</font>}}|{{#ifexist:{{BASEPAGENAME}}/Draft|<br><font size=1>''[[{{BASEPAGENAME}}/Draft|Draft Page]]''</font>}} }}<!--
-->{{ #ifeq: {{../../Info|info=pagename}}/Signed articles|{{BASEPAGENAME}}|{{#ifexist:{{../../Info|info=pagename}}/Draft|<br><font size=1>''[[{{../../Info|info=pagename}}/Draft|Draft Page]]''</font>}}|{{#ifexist:{{BASEPAGENAME}}/Draft|<br><font size=1>''[[{{BASEPAGENAME}}/Draft|Draft Page]]''</font>}} }}<!--


***The following template 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.***


-->{{Default button}}<!--
-->{{ #ifeq: {{../../Info|info=pagename}}/Signed articles|{{BASEPAGENAME}}|{{subpages6}}|{{ #ifeq: {{Subpage list|button=1C}}|Default|{{subpage_list_row|{{Subpage list|button=1A}}|{{Subpage list|button=1B}} }} }}<nowiki>


***The following template 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=2C}}|Default|{{subpage_list_row|{{Subpage list|button=2A}}|{{Subpage list|button=2B}} }} }}<nowiki>
 
</nowiki>{{ #ifeq: {{Subpage list|button=3C}}|Default|{{subpage_list_row|{{Subpage list|button=3A}}|{{Subpage list|button=3B}} }} }}<nowiki>
 
</nowiki>{{ #ifeq: {{Subpage list|button=4C}}|Default|{{subpage_list_row|{{Subpage list|button=4A}}|{{Subpage list|button=4B}} }} }}<nowiki>
 
</nowiki>{{ #ifeq: {{Subpage list|button=5C}}|Default|{{subpage_list_row|{{Subpage list|button=5A}}|{{Subpage list|button=5B}} }} }}<nowiki>
 
</nowiki>{{ #ifeq: {{Subpage list|button=6C}}|Default|{{subpage_list_row|{{Subpage list|button=6A}}|{{Subpage list|button=6B}} }} }}<nowiki>
 
</nowiki>{{ #ifeq: {{Subpage list|button=7C}}|Default|{{subpage_list_row|{{Subpage list|button=7A}}|{{Subpage list|button=7B}} }} }}<nowiki>
 
</nowiki>{{ #ifeq: {{Subpage list|button=8C}}|Default|{{subpage_list_row|{{Subpage list|button=8A}}|{{Subpage list|button=8B}} }} }}<nowiki>
 
</nowiki>{{ #ifeq: {{Subpage list|button=9C}}|Default|{{subpage_list_row|{{Subpage list|button=9A}}|{{Subpage list|button=9B}} }} }}<nowiki>
 
</nowiki>{{ #ifeq: {{Subpage list|button=10C}}|Default|{{subpage_list_row|{{Subpage list|button=10A}}|{{Subpage list|button=10B}} }} }}<nowiki>
 
</nowiki>{{ #ifeq: {{Subpage list|button=11C}}|Default|{{subpage_list_row|{{Subpage list|button=11A}}|{{Subpage list|button=11B}} }} }}<nowiki>
 
</nowiki>{{ #ifeq: {{Subpage list|button=12C}}|Default|{{subpage_list_row|{{Subpage list|button=12A}}|{{Subpage list|button=12B}} }} }}<nowiki>
 
</nowiki>{{ #ifeq: {{Subpage list|button=13C}}|Default|{{subpage_list_row|{{Subpage list|button=13A}}|{{Subpage list|button=13B}} }} }}<nowiki>
 
</nowiki>{{ #ifeq: {{Subpage list|button=14C}}|Default|{{subpage_list_row|{{Subpage list|button=14N}}|{{Subpage list|button=14B}} }} }}<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}} }} }}<!--
 
***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.***
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.***


-->{{Optional_button}}
-->{{ #ifeq: {{Subpage list|button=1C}}|Optional|{{#ifexist:{{BASEPAGENAME}}/{{Subpage list|button=1A}}|{{subpage_list_row|{{Subpage list|button=1A}}|{{Subpage list|button=1B}} }} }} }}<nowiki>
 
</nowiki>{{ #ifeq: {{Subpage list|button=2C}}|Optional|{{#ifexist:{{BASEPAGENAME}}/{{Subpage list|button=2A}}|{{subpage_list_row|{{Subpage list|button=2A}}|{{Subpage list|button=2B}} }} }} }}<nowiki>
 
</nowiki>{{ #ifeq: {{Subpage list|button=3C}}|Optional|{{#ifexist:{{BASEPAGENAME}}/{{Subpage list|button=3A}}|{{subpage_list_row|{{Subpage list|button=3A}}|{{Subpage list|button=3B}} }} }} }}<nowiki>
 
</nowiki>{{ #ifeq: {{Subpage list|button=4C}}|Optional|{{#ifexist:{{BASEPAGENAME}}/{{Subpage list|button=4A}}|{{subpage_list_row|{{Subpage list|button=4A}}|{{Subpage list|button=4B}} }} }} }}<nowiki>
 
</nowiki>{{ #ifeq: {{Subpage list|button=5C}}|Optional|{{#ifexist:{{BASEPAGENAME}}/{{Subpage list|button=5A}}|{{subpage_list_row|{{Subpage list|button=5A}}|{{Subpage list|button=5B}} }} }} }}<nowiki>
 
</nowiki>{{ #ifeq: {{Subpage list|button=6C}}|Optional|{{#ifexist:{{BASEPAGENAME}}/{{Subpage list|button=6A}}|{{subpage_list_row|{{Subpage list|button=6A}}|{{Subpage list|button=6B}} }} }} }}<nowiki>
 
</nowiki>{{ #ifeq: {{Subpage list|button=7C}}|Optional|{{#ifexist:{{BASEPAGENAME}}/{{Subpage list|button=7A}}|{{subpage_list_row|{{Subpage list|button=7A}}|{{Subpage list|button=7B}} }} }} }}<nowiki>
 
</nowiki>{{ #ifeq: {{Subpage list|button=8C}}|Optional|{{#ifexist:{{BASEPAGENAME}}/{{Subpage list|button=8A}}|{{subpage_list_row|{{Subpage list|button=8A}}|{{Subpage list|button=8B}} }} }} }}<nowiki>
 
</nowiki>{{ #ifeq: {{Subpage list|button=9C}}|Optional|{{#ifexist:{{BASEPAGENAME}}/{{Subpage list|button=9A}}|{{subpage_list_row|{{Subpage list|button=9A}}|{{Subpage list|button=9B}} }} }} }}<nowiki>
 
</nowiki>{{ #ifeq: {{Subpage list|button=10C}}|Optional|{{#ifexist:{{BASEPAGENAME}}/{{Subpage list|button=10A}}|{{subpage_list_row|{{Subpage list|button=10A}}|{{Subpage list|button=10B}} }} }} }}<nowiki>
 
</nowiki>{{ #ifeq: {{Subpage list|button=11C}}|Optional|{{#ifexist:{{BASEPAGENAME}}/{{Subpage list|button=11A}}|{{subpage_list_row|{{Subpage list|button=11A}}|{{Subpage list|button=11B}} }} }} }}<nowiki>
 
</nowiki>{{ #ifeq: {{Subpage list|button=12C}}|Optional|{{#ifexist:{{BASEPAGENAME}}/{{Subpage list|button=12A}}|{{subpage_list_row|{{Subpage list|button=12A}}|{{Subpage list|button=12B}} }} }} }}<nowiki>
 
</nowiki>{{ #ifeq: {{Subpage list|button=13C}}|Optional|{{#ifexist:{{BASEPAGENAME}}/{{Subpage list|button=13A}}|{{subpage_list_row|{{Subpage list|button=13A}}|{{Subpage list|button=13B}} }} }} }}<nowiki>
 
</nowiki>{{ #ifeq: {{Subpage list|button=14C}}|Optional|{{#ifexist:{{BASEPAGENAME}}/{{Subpage list|button=14A}}|{{subpage_list_row|{{Subpage list|button=14N}}|{{Subpage list|button=14B}} }} }} }}<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}} }} }} }} }}
|-
|-
|<center><font size=1>''[[CZ:Subpage Pilot|About Clusters]]''</font></center>
|<center><font size=1>''[[CZ:Subpage Pilot|About Clusters]]''</font></center>
Line 77: Line 137:
}}{{#ifeq:{{PAGENAME}} |{{BASEPAGENAME}}/{{Subpage list|button=15A}}|{{ {{Subpage list|button=15A}} header2|group= {{{{BASEPAGENAME}}/Info|info=cat1}}|group2= {{{{BASEPAGENAME}}/Info|info=cat2}}|group3={{{{BASEPAGENAME}}/Info|info=cat3}}|abc={{{{BASEPAGENAME}}/Info|info=abc}}|approved= {{{{BASEPAGENAME}}/Info|info=approved}} }}  
}}{{#ifeq:{{PAGENAME}} |{{BASEPAGENAME}}/{{Subpage list|button=15A}}|{{ {{Subpage list|button=15A}} header2|group= {{{{BASEPAGENAME}}/Info|info=cat1}}|group2= {{{{BASEPAGENAME}}/Info|info=cat2}}|group3={{{{BASEPAGENAME}}/Info|info=cat3}}|abc={{{{BASEPAGENAME}}/Info|info=abc}}|approved= {{{{BASEPAGENAME}}/Info|info=approved}} }}  


}}{{#ifeq:{{PAGENAME}} |{{BASEPAGENAME}}/{{Subpage list|button=16A}}|{{ {{Subpage list|button=16A}} header2|group= {{{{BASEPAGENAME}}/Info|info=cat1}}|group2= {{{{BASEPAGENAME}}/Info|info=cat2}}|group3={{{{BASEPAGENAME}}/Info|info=cat3}}|abc={{{{BASEPAGENAME}}/Info|info=abc}}|approved= {{{{BASEPAGENAME}}/Info|info=approved}} }} }}<noinclude>
}}{{#ifeq:{{PAGENAME}} |{{BASEPAGENAME}}/{{Subpage list|button=16A}}|{{ {{Subpage list|button=16A}} header2|group= {{{{BASEPAGENAME}}/Info|info=cat1}}|group2= {{{{BASEPAGENAME}}/Info|info=cat2}}|group3={{{{BASEPAGENAME}}/Info|info=cat3}}|abc={{{{BASEPAGENAME}}/Info|info=abc}}|approved= {{{{BASEPAGENAME}}/Info|info=approved}} }} }}
 
Examples of this templates usage can be found at the [[Anthropology]] cluster (not approved) and the [[Life]] cluster (approved).
 
Templates associated with the subpages4 template:
 
==Function==
Two functions are associated with this template.  First to place a subpage navigation box with the appropriate buttons on each page.  Second, to define the header and categories for each subpage.
 
===Navigation box===
* {{tl|Subpage list}}
::Defines the button names and whether they are ''Default'' or ''Optional''
* {{tl|Button on}}
::Definition of the ON button colour and style.
* {{tl|Button off}}
::Definition of the OFF button colour and style.
* {{tl|Default button}}
::Adds the ''Default'' buttons to the navigation box whether they exist or not (so expect so red links, the idea is to encourage people to create those missing subpages)
* {{tl|Optional button}}
::Adds the ''Optional'' buttons to the navigation box if they exist in the cluster. (these are added to the navigation box after the default buttons have been set).
* {{tl|Subpage list row3}}
::Toggles button to on ON or OFF.  ON if the subpage is being viewed. (''I am sure there is a more economic way to do this.  If you're watching, and know how, feel free to step in and fix it'' :) Actually, I'm sure many parts of the whole set can be improved.  Please go ahead and tinker if you have some ideas.)
 
===Header and categories===
* {{tl|Anthropology/Info}}
*:Each article will have its own ''info template'' if the subpage4 concept is adopted  (Anthropology shown as an example). The ''info template'' is critical to the functionality of the subpages4 template since it is a central depository for all the information related to the article.  This includes the ''checklist'' template information, the ''approved'' template information and the ''ToApprove'' template info. All the header templates discussed below access data from this template.
** {{tl|Approved2}} or {{tl|Construction2}}
**: One of these will be placed on the article page depending on whether the article is approved or not. Much of their usage depends on how we use the ''Draft pages'' in the future. At present, the example of subpages4 at the Anthropology cluster assumes that all writing will be done on the draft page, whereas the article will only have text once it is approved (NOTE:  this is not current practice but is an option that has been discussed in the forums. I have set it up this way to visualise how such a solution might look in practice.)
** {{tl|Draft header2}}
**: My idea for how this template will work has morphed into {{tl|Checklist3}} This template places the categories designated from the checklist data on the Draft page (currently they go to the Talk:Draft page). This is advatageous since at present every entry in the categories starts with Talk:. This is not a huge problem but having the page name first is an improvement, despite the fact that every name has /Draft after it. One solution would be place these categories onto the articles main page, however, under this format (Draft page is edited for all articles) it is better having the category links go directly to the version being edited.
** {{tl|Related header2}}, {{tl|Bibliography header2}}, {{tl|Gallery header2}} and {{tl|Links header2}}
**: These represent preliminary ideas for adding categories to the subpages. They uses the information from the info template to add specific categories dependent on workgroups and whether the article is approved or not. Below are others that will probably functiona in a similar way.
**** {{tl|Tables header2}}
**** {{tl|Tutorials header2}}
**** {{tl|Debate guide header2}}
**** {{tl|News guide header2}}
**** {{tl|Signed articles header2}}
**** {{tl|Discography header2}}
**** {{tl|Timelines header2}}
**** {{tl|Signed Article Header}}
** {{tl|Checklist2}}
**: This variant of the checklist is placed on the Talk:Draft page and adds the checklist to the top of the page.  Visually this is similar to the current checklist except the categories are not placed on this page and the data is cribbed from the articles info template.
** {{tl|Draft header2}}
**: To be decided but might be good to advertise the fact there is an aproved version when that is the case.
** {{tl|Unused subpages}} 
**: This is used to identify any unused subpages ina particular cluster.
** {{tl|Yes-or-no}}
**: This is used in both checklists
</noinclude>

Revision as of 19:08, 28 July 2007