Template:Subpages: Difference between revisions

From Citizendium
Jump to navigation Jump to search
imported>Chris Day
No edit summary
imported>Chris Day
No edit summary
Line 6: Line 6:
|align="top" align="right"|
|align="top" align="right"|
{|width="100px" border="0" cellpadding="1" cellspacing="3" style="background:#B8DAE5"
{|width="100px" border="0" cellpadding="1" cellspacing="3" style="background:#B8DAE5"
|align=center|<font size=1>'''Cluster'''</font>
|align=center|<font size=1>'''Cluster'''</font><!--
{{ #ifeq: {{#expr: {{#len:{{BASEPAGENAME}}}} > 20 }} | 1 | '''[[{{BASEPAGENAME}}|Main Article]]''' | '''[[{{BASEPAGENAME}}]]''' }}
{{#ifexist:{{NAMESPACE}}:{{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 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 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: {{#expr: {{#len:{{BASEPAGENAME}}}} > 20 }} | 1 | '''[[{{BASEPAGENAME}}|Main Article]]''' | '''[[{{BASEPAGENAME}}]]''' }}<!--
 
***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 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 46: Line 52:
</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 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.***


-->{{ #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 86: Line 92:
|<center><font color="#333333" size=1>[[{{BASEPAGENAME}}/Unused|Unused subpages]]</font></center>
|<center><font color="#333333" size=1>[[{{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***


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

Revision as of 10:35, 23 July 2007

ClusterSubpages
About Clusters
Unused subpages

Here's a test page -- see the upper right

For discussion about Subpages, and other versions of subpages templates with examples, also see http://forum.citizendium.org/index.php/topic,1059.0.html



Placement

Use on the top of pages as an index mechanism for subpages.

Usage





{{Subpages}}
ClusterSubpages
About Clusters
Unused subpages
ClusterSubpages
About Clusters
Unused subpages
Wikitext Appearance Anatomical

Parameters

None

Credits