Template:Subpages4: Difference between revisions

From Citizendium
Jump to navigation Jump to search
imported>Chris Day
(rv)
imported>Chris Day
No edit summary
Line 1: Line 1:
<!--
<div style="float:left; width:80%;"><!--
 
The following code is the subpages template that includes the subroutines to choose the default and optional buttons
 
-->{|class=noprint align=right width=120px cellpadding="1" cellspacing="0" border="0" style="background-color: #ffffff"
|align="top" align="right"|
{|width=110px border="0" cellpadding="1" cellspacing="3" {{#ifeq:{{{{BASEPAGENAME}}/Info|info=approved}}|yes|style="background:#ddffdd|style="background:#B8DAE5}}; border-bottom:2px solid #aaaaaa; border-top:2px solid #eeeeee; border-left:2px solid #bbbbbb; border-right:2px solid #ffffff"
|align=center|<font size=1>'''Cluster'''</font>
<!--
 
***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: {{../../Info|info=pagename}}/Signed articles|{{BASEPAGENAME}}|{{ #ifeq: {{#expr: {{#len:{{../../Info|info=pagename}}}} > 20 }} | 1 | '''[[{{../../Info|info=pagename}}|Main Article]]''' | '''[[{{../../Info|info=pagename}}]]''' }}<br><font size=1>''[[Template:{{../../Info|info=pagename}}/Info|Information]]''</font>|{{ #ifeq: {{#expr: {{#len:{{BASEPAGENAME}}}} > 20 }} | 1 | '''[[{{BASEPAGENAME}}|Main Article]]''' | '''[[{{BASEPAGENAME}}]]''' }}<br><font size=1>''[[Template:{{BASEPAGENAME}}/Info|Information]]''</font>}}<!--
 
***The next piece of code adds a Link to the draft page if it exists***
 
-->{{ #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 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}}<!--
 
***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.
 
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}}
|-
|<center><font size=1>''[[CZ:Subpage Pilot|About Clusters]]''</font></center>
|-
|<center><font color="#333333" size=1>{{ #ifeq: {{../../Info|info=pagename}}/Signed articles|{{BASEPAGENAME}}|[[{{../../Info|info=pagename}}/Unused|Unused subpages]]|[[{{BASEPAGENAME}}/Unused|Unused subpages]]}}</font></center>
|}
|}<!--


***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***
Line 77: Line 43:
}}{{#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}} }} }}</div>
<div style="float:right; width:20%"><!--The following code is the subpages template that includes the subroutines to choose the default and optional buttons
 
-->
{|class=noprint align=right width=120px cellpadding="1" cellspacing="0" border="0" style="background-color: #ffffff"
|align="top" align="right"|
{|width=110px border="0" cellpadding="1" cellspacing="3" {{#ifeq:{{{{BASEPAGENAME}}/Info|info=approved}}|yes|style="background:#ddffdd|style="background:#B8DAE5}}; border-bottom:2px solid #aaaaaa; border-top:2px solid #eeeeee; border-left:2px solid #bbbbbb; border-right:2px solid #ffffff"
|align=center|<font size=1>'''Cluster'''</font>
<!--
 
***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: {{../../Info|info=pagename}}/Signed articles|{{BASEPAGENAME}}|{{ #ifeq: {{#expr: {{#len:{{../../Info|info=pagename}}}} > 20 }} | 1 | '''[[{{../../Info|info=pagename}}|Main Article]]''' | '''[[{{../../Info|info=pagename}}]]''' }}<br><font size=1>''[[Template:{{../../Info|info=pagename}}/Info|Information]]''</font>|{{ #ifeq: {{#expr: {{#len:{{BASEPAGENAME}}}} > 20 }} | 1 | '''[[{{BASEPAGENAME}}|Main Article]]''' | '''[[{{BASEPAGENAME}}]]''' }}<br><font size=1>''[[Template:{{BASEPAGENAME}}/Info|Information]]''</font>}}<!--
 
***The next piece of code adds a Link to the draft page if it exists***
 
-->{{ #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 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}}<!--
 
***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.
 
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}}
|-
|<center><font size=1>''[[CZ:Subpage Pilot|About Clusters]]''</font></center>
|-
|<center><font color="#333333" size=1>{{ #ifeq: {{../../Info|info=pagename}}/Signed articles|{{BASEPAGENAME}}|[[{{../../Info|info=pagename}}/Unused|Unused subpages]]|[[{{BASEPAGENAME}}/Unused|Unused subpages]]}}</font></center>
|}
|}
</div><noinclude>


==Usage==
==Usage==

Revision as of 14:59, 25 July 2007

Cluster

Subpages4
InformationTemplate:Default button

About Clusters
Unused subpages

Usage

Examples of this templates use can be found at the Anthropology cluster (not approved) and the Life cluster (approved).


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.Templates associated with the {{subpages4}} template are described below:


Navigation box

Defines the button names and whether they are Default or Optional
Definition of the ON button colour and style.
Definition of the OFF button colour and style.
Adds the Default buttons to the navigation box whether they exist or not (so expect to see some red links, the idea is to encourage people to create those missing subpages)
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).
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.)

For additional subpage ideas a new button can be added to the navigation box by replacing the FREE BUTTON place holders in the {{Subpage list}} template. If there are no free buttons in the existing template then additional button code must be added to the following three templates: {{Subpage list}}, {{Default button}} and {{Optional button}}

Header and categories

If the subpage4 concept is adopted each article will have its own info template (Anthropology linked above as an example). The info template is critical to the functionality of the subpages4 template since it is the central depository for all the information related to the article. This includes the checklist template information, the approved template information and the ToApprove template information.

All the header templates discussed below access data from the info template. This is a huge advantage since all the subpages are coordinated with the articles changing status, as recorded in the info template.

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.)
To be decided but might be good to advertise the fact there is an aproved version when that is the case, however, i am leaning towards having the navigation box colour be disitinct for approved article (possibly green?).
My idea for how this template will work has begun to morph into {{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 advantageous 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.
These represent preliminary ideas for adding a simple descriptive banner and 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.
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.
This is used to identify any unused subpages in a particular cluster.
This is used in both checklists

Random thoughts

Feel free to add new additions or suggest changes. Discussion of these points can continue of the talk page Template_talk:Subpages4.

Ideas not yet incorporated into this tempalte:

  1. The placement of the ToApprove template will be controlled by this template when an editor adds their name to the ToA Editor field and completes all the other ToApprove fields in the "info template".
  2. The navigation box will be a different colour for approved articles (Green?). This allows a reader to quickly note if the content has been approved, even when browsing the subpages. Could also have a colour that designates when the cluster has a ToApprove template placed since it is often a time to mention problems with the articles and subpages on the talk page. These types of visual signals should aid the readers as well as authors.
  3. With the navigation box on the Talk:Draft page the archive box is semi-redundant. The archive links can be incorporated into the {{checklist2}} table on the Talk:Draft page to free up space at the top of the page.