CZ:Using the subpages template: Difference between revisions

From Citizendium
Jump to navigation Jump to search
imported>Chris Day
imported>Hayford Peirce
 
(48 intermediate revisions by 9 users not shown)
Line 1: Line 1:
{{Technical Help}}
'
The current ''active'' template is now {{tl|subpages}}.
 
==Why use the Subpages template?==
==Why use the subpages template?==
At first glance the subpages template adds the navigation tabs at the top of the page, and while this is useful, the real power of the template is not as obvious. The short version is that when this template is used on every page in an article cluster it saves time and makes the categorisation and ''look'' of the pages consistent.
At first glance the {{tl|subpages}} [[MediaWiki template|template]] adds the navigation tabs at the top of the [[MediaWiki page|page]], and while this is useful, the real power of the template is not as obvious. The short version is that when this template is used on every page in an article [[CZ:Article structure|cluster]] it saves time and makes the categorisation and ''look'' of the pages consistent.
 
===Automatic creation of metadata, etc===
As soon as any (sub)page in the cluster is given the subpages template, creation of the metadata page is also automagically suggested. If the user proceeds to do so, it is automagically filled with a blank metadata template; all the user has to do it fill in a few checklist fields on the metadata template. The user is also prompted to create the Talk:, etc, pages, and the appropriate headers are automagically created in them.


===Adds subpage navigation box===
===Adds subpage navigation box===
:<small>''Requires that each subpage is a recognised name; see the current list of available subpage types at [[Template:Subpage list 2]]''</small>
:<small>''Requires that each subpage is a recognised name; see the current list of available subpage types at [[Template:Subpage list]]''</small>
The template adds a subpage navigation box at the top of each page in the article cluster. It can automatically identify each subpage in an article cluster and automatically adds a tab to the navigation box for each one present.  
The template adds a subpage navigation box at the top of each page in the article cluster. It can automatically identify each subpage in an article cluster and automatically adds a tab to the navigation box for each one present.


===Automatic placement of categories===
===Automatic placement of categories===
:<small>''Requires that each cluster has a metadata template; see an example at [[Template:Biology/Metadata]]''</small>
:<small>''Requires that each cluster has a metadata template; see an example at [[Template:Biology/Metadata]]''</small>
Using the information about each article, that is stored on a specific metadata template, the subpages template manages the placement of categories and approval templates in a cluster. For example, if one new workgroup is added, or one removed, from the metadata template this has an immediate global effect on the categories in the whole cluster. This saves a lot of time since the manual placement or removal of categories is no longer required. This has the added advantage that all the pages in a cluster are consistent at all times.
Using the information about each article which is stored in the article's [[CZ:Metadata|metadata]], the subpages template manages the placement of categories and approval templates in a cluster. For example, if a workgroup is added or removed from the metadata, this has an immediate global effect on the categories in the whole cluster. This saves a lot of time since the manual placement or removal of categories is no longer required. This has the added advantage that all the (sub)pages in a cluster are consistent at all times.


===Automatic placement of headers===
===Automatic placement of headers===
Headers for each subpage are added automatically and in the future this one template will allow us to modify the design or wording of ALL the articles in the citizendium with a minimal number of edits. The checklist table also "magically" appears on the talk page of the article after the checklist fields are completed on the metadata template.
Headers for each subpage are added automatically, and in the future this one template will allow us to modify the design or wording of ALL the articles in the citizendium with a minimal number of edits. The checklist table also automatically appears on the talk page of the article once the checklist fields are completed in the metadata.


===Automatic placement of approval templates===
===Automatic placement of approval templates===
:<small>''Requires that each cluster has an approval subpage; see an example at [[Biology/Approval]]''</small>
:<small>''Requires that each cluster has an approval subpage; see an example at [[Biology/Approval]]''</small>
Constables and editors who manage the approval process will only have to edit the metadata template.  Just the addition of an editors name in the ToApprove section of the metadata template will cause the {{tl|ToApprove}} template to appear on all subpages in a cluster and add the article to the ToApprove category. This more simple approach to managing the approval process should help make the approval process easier.  With similar ease the {{tl|Approved}} template is correctly placed on an approved article by correctly updating the metadata template.
Constables and editors who manage the approval process will only have to edit the metadata template.  The addition of an editors name in the ToApprove section of the metadata template will cause a nomination notice to be visible on all relevant subpages in a cluster and adding the article to the [[:Category:Articles_to_Approve|ToApprove]] category. The goal is to simplify the approach to managing the approval process.  With similar ease, by updating the metadata template after approval, the {{tl|Approved3}} template is placed at the head of the approved article. Constables or editors can easily document the whole process by correctly adding the {{tl|Approval}} template on the article's /Approval page.


===A consistent ''look''===
===A consistent ''look''===
A final aesthetic touch is that the subpages template controls the background colours for the navigation tabs of approved (green) and unapproved (blue) articles.  This has the advantage that the approved articles are move obvious when browsing between the different subpages. The consistent placement of all the navigation tools, notices and categories will make browsing CZ articles much more predicatable for a new user.
A final aesthetic touch is that the subpages template controls the background colours for the navigation tabs of approved (green) and unapproved (blue) articles.  This has the advantage that the approved articles are more obvious, when browsing between the different subpages. The consistent placement of all the navigation tools, notices and categories will make browsing CZ articles much more predicatable for a new reader.


==How to use the Subpages template==
==Instructions for placing the Subpages template==


'''Note:''' For brand new pages, all you need to fill out is "pagename" (the exact title of the article) and "abc" (same as the pagename, but if a biography: last name, first), and "cat1" would be nice too (see our [[CZ:Workgroups|workgroup list]]).  If you want to complete the whole checklist section, which would be nice, see [[CZ:The Article Checklist|The Article Checklist]]''Don't'' fill out the "required for ToApprove template" and "required for Approved template" ssections.
===First time===
'''1)''' Type {{tl|subpages}} at the top of the article page and save.   


'''1)''' Place  {{tl|subpages9}} at the top of every page in a cluster, including all talk pages and subpages.  Don't worry that the page looks messy. It is now necessary to fillin the 'metadata' page:
'''2)''' The newly created page will prompt you to create a metadata page. After clicking the metadata page link, a new page will open and you will see an edit box containing the following fields:


'''2) ''' For the subpages9 template to function correctly it is important to set up an additonal [[Template:{{BASEPAGENAME}}/Metadata|Metadata template]] for each article. This is easily done by clicking on the 'M' on the blue bar that the subpages9 template put on the top of the page.  Cut and paste the following code to a generic template named '''''Template:ARTICLENAME/Metadata'''''. Don't forget to at least fill in the pagename.
{{metadata_basic}}
<pre>
{{#switch: {{{info}}}
<!--Pagename must be filled out for template to work correctly-->
|      pagename =
|        dialect =
<!--required for checklist -->
|            abc =
|      cat_check =
|        status =
|    underlinked =
|        cleanup =
|            by =
|          cat1 =
|          cat2 =
|          cat3 =
<!--required for ToApprove template-->
|    article url =
|    subpage url =
|        cluster =
|            now =
|    ToA editor =
|    ToA editor2 =
|    ToA editor3 =
|          date =
<!--required for Approved template-->
|      A editor =
|      A editor2 =
|      A editor3 =
}}<noinclude>{{subpages9}}</noinclude>
</pre>


The checklist parameters should be filled out in the usual way (see instructions below for a description of usage for all the fields in the metadata template.) Converting a current article is easily achived by cutting and pasting the parameters from the current checklist, that already exists on the talk page, to the new Metadata template for the article.
'''3)''' Fill out the "pagename" (the exact title of the article) and "abc" (same as the pagename, but if a biography: last name, first) and preferably "cat1" too (see our [[CZ:Workgroups|workgroup list]]).  If you want to complete the whole checklist section, which would be nice, see [[CZ:The Article Checklist|The Article Checklist]] or read the see descriptions below for all the fields in the metadata template. ''Don't'' fill out the "required for ToApprove template" and "required for Approved template" sections.


'''3)''' In addition to the checklist parameters it is also important to complete the '''pagename''' parameter. A warning note will pop up on the navigation template if this is not done.
'''4)''' You will be prompted to create the two utility pages that are common to all articles; the '''Talk''' page and the '''Approval''' page.


'''4)''' Two other pages need to be created to complete the new cluster. An [[{{BASEPAGENAME}}/Approval|approval subpage]] and a [[{{BASEPAGENAME}}/Unused|Unused subpages list]]. A {{tl|subpages9}} template should be placed at the top of both these pages. Neither of these pages are as important as the metadata template page and they could be created at a later date.
'''5)''' Once the metadata page and both utility pages are created the article cluster is complete. You are finished!
 
===Adding optional subpages to articles already using subpages===
 
# Go to the talk page of the article.
# Click on the ''show'' link next to the label "Unused pages" at the top of the talk page. A list of subpages for the article that have not yet been created, will appear.
# Click on the name of the subpage you wish to create. You will see and edit pages with a preloaded {{tl|subpages}} template at the top.
# If your intended subpage is not included in the list, see [[CZ:Article-specific subpages]] and [[CZ:How to add a new subpage type]].
 
===Removing a subpage from an article===
 
# The link to an optional subpage is automatically inserted whenever the file exists, i.e., it will still be displayed if the page is empty (has been blanked).  
# In order to remove the link from the list (and automatically reinsert it into the list of unused subpages on the talk page template) the page has to be '''deleted'''.
# Alternatively, in order to save the history, it can be moved to a talk page archive (e.g., of the talk page of this subpage).
# Then the redirect created by the move has to be deleted.


==Parameters==
==Parameters==
Line 72: Line 60:
:''pagename'' = The exact pagename is used.  It is required for navigation back to the home page on subpages.
:''pagename'' = The exact pagename is used.  It is required for navigation back to the home page on subpages.


:''dialect'' = will be used to designate the spelling and grammar, primarily whether the article is written in American or English English.
:''variant'' = will be used to designate the spelling and grammar, primarily whether the article is written in '''AE''' - American, '''AuE''' - Australian, '''BE''' - British or '''CE''' - Canadian English.


'''Checklist parameters'''
'''Checklist parameters'''
Line 86: Line 74:
:''cleanup'' = put "yes" if basic cleanup has been done.
:''cleanup'' = put "yes" if basic cleanup has been done.


:''by'' = Names of anyone editing the checklist, in reverse chronological order.
:''by'' = obsolete; leave blank


:''cat1'' = must be an existing workgroup
:''cat1'' = must be an existing workgroup
:''cat2'' = second workgroup (optional but must use before group3 if only two workgroups)
:''cat2'' = second workgroup (optional but must use before group3 if only two workgroups)
:''cat3'' = third workgroup (optional)
:''cat3'' = third workgroup (optional)


Line 111: Line 97:


:''ToA editor'' = the username of the person who did the approval (or who nominated the article on behalf of a group of people)
:''ToA editor'' = the username of the person who did the approval (or who nominated the article on behalf of a group of people)
:''ToA editor2'' = second editor  (optional field but must use before editor3 if only two editors approved)
:''ToA editor2'' = second editor  (optional field but must use before editor3 if only two editors approved)
:''ToA editor3'' = third editor (optional field)
:''ToA editor3'' = third editor (optional field)


Line 119: Line 103:


'''Approved template'''
'''Approved template'''
:''A editor'' =  the username of the person who initiated the approval (or who nominated the article on behalf of a group of people)
:''A editor'' =  the username of the person who initiated the approval (or who nominated the article on behalf of a group of people)
:''A editor2'' = second editor  (optional field but must use before editor3 if only two editors approved)
:''A editor3'' = third editor (optional field)
==Moving an article with subpages==
In the event that it is necessary to move or rename an [[CZ:Article|article]], it is easiest to move all the related [[CZ:Subpages|subpages]] before moving the article itself.
At the moment, the easiest way to find out which subpages the page has (out of the large set of possible ones) is to look at the subpages navigation bar at the top of the article main page. You can simply click on each one in turn to go to them. (If you don't want to use the back button on your browser to get back to the article's main page, once you're done with a subpage, you can right-click on the subpages and open them in new windows/tabs. ''Note:'' The subpage navigation bar at the top of the page will cease to function temporarilly once you have moved the page, so you can't use that to get back to the article's main page; don't worry, though, everything will all work again once you're finished.)
Once you're at a subpage, move it to the new name, using the "move" tab (at the very top of the page). (''Important'': do '''not''' '''''ever''''' move a page by cutting and pasting - or copying and pasting - the contents, as this will divorce the content from its edit history. If a move fails, ask a more experience user, or a constable, for help solving your problem.) Note: If any of the subpages have associated Talk: pages, make sure to check the "Move associated talk page" box on the move confirmation page to move them too.
Once you have moved all the 'normal' subpages (kept in the main article namespace), it's time to move the article's [[CZ:Metadata|Metadata]] page (which is kept in the [[Mediawiki namespaces|Template: name space]]). The easiest way to get to this page is to go to the article's Talk: page, and click on the yellow "M" button; this will (should?) take you to the Metadata page. Use the "move" tab (as in the paragraph above) to move that to the new name. '''VERY IMPORTANT''': You ''must'' change the "pagename =" field in the metadata to the article's new name; you can do this either before, or after, you move the Metadata.
<!-- Deprecated: JNC.
The alternative would be to create a new metadata page after you have renamed the article with the new name and then delete the old metadata page, but this would lose the history of prior changes to the metadata (since the 'by =' field is now obsoleted), so this technique is deprecated.  Don't forget to copy and paste any information from the old template to the new one. -->
Once you have moved all the other pages, including the subpages and the Metadata page, then it's time to move the article's main page, and its Talk: page. As before, use the 'move' tab at the very top of the page to do this, and again, check to make sure that the "Move associated talk page" box is checked.
You're done! The article should be all at the new name, and everything should work properly.
===Other techniques for finding all the subpages===
Another technique to find all the subpages is to use the "What links here" function. To to this, go the article's main page, and click on "What links here" at the very bottom of the left-hand column. Among the other pages listed, should be all the article's subpages. ''Note:'' This method doesn't work if any of the subpages do not have the proper {{tl|Subpages}} header.


:''A editor2'' = second editor  (optional field but must use before editor3 if only two editors approved)
The most robust method is to use a special built-in MediaWiki function. Open the [[Special:Prefixindex/PAGE_NAME]] special form in a separate window/tab (so you can continue to read these instructions in this one :-), go into the "Display pages with prefix" input box in that new window/tab, and replace ''PAGE_NAME'' with the name of the page you're trying to move. This will definitely show all the subpages. (You can also do this once you think you're done moving all the subpages; it will show if you missed any.)


:''A editor3'' = third editor (optional field)
{{Technical Help}}

Latest revision as of 18:53, 23 March 2010

'

Why use the subpages template?

At first glance the {{subpages}} template adds the navigation tabs at the top of the page, and while this is useful, the real power of the template is not as obvious. The short version is that when this template is used on every page in an article cluster it saves time and makes the categorisation and look of the pages consistent.

Automatic creation of metadata, etc

As soon as any (sub)page in the cluster is given the subpages template, creation of the metadata page is also automagically suggested. If the user proceeds to do so, it is automagically filled with a blank metadata template; all the user has to do it fill in a few checklist fields on the metadata template. The user is also prompted to create the Talk:, etc, pages, and the appropriate headers are automagically created in them.

Adds subpage navigation box

Requires that each subpage is a recognised name; see the current list of available subpage types at Template:Subpage list

The template adds a subpage navigation box at the top of each page in the article cluster. It can automatically identify each subpage in an article cluster and automatically adds a tab to the navigation box for each one present.

Automatic placement of categories

Requires that each cluster has a metadata template; see an example at Template:Biology/Metadata

Using the information about each article which is stored in the article's metadata, the subpages template manages the placement of categories and approval templates in a cluster. For example, if a workgroup is added or removed from the metadata, this has an immediate global effect on the categories in the whole cluster. This saves a lot of time since the manual placement or removal of categories is no longer required. This has the added advantage that all the (sub)pages in a cluster are consistent at all times.

Automatic placement of headers

Headers for each subpage are added automatically, and in the future this one template will allow us to modify the design or wording of ALL the articles in the citizendium with a minimal number of edits. The checklist table also automatically appears on the talk page of the article once the checklist fields are completed in the metadata.

Automatic placement of approval templates

Requires that each cluster has an approval subpage; see an example at Biology/Approval

Constables and editors who manage the approval process will only have to edit the metadata template. The addition of an editors name in the ToApprove section of the metadata template will cause a nomination notice to be visible on all relevant subpages in a cluster and adding the article to the ToApprove category. The goal is to simplify the approach to managing the approval process. With similar ease, by updating the metadata template after approval, the {{Approved3}} template is placed at the head of the approved article. Constables or editors can easily document the whole process by correctly adding the {{Approval}} template on the article's /Approval page.

A consistent look

A final aesthetic touch is that the subpages template controls the background colours for the navigation tabs of approved (green) and unapproved (blue) articles. This has the advantage that the approved articles are more obvious, when browsing between the different subpages. The consistent placement of all the navigation tools, notices and categories will make browsing CZ articles much more predicatable for a new reader.

Instructions for placing the Subpages template

First time

1) Type {{subpages}} at the top of the article page and save.

2) The newly created page will prompt you to create a metadata page. After clicking the metadata page link, a new page will open and you will see an edit box containing the following fields:

{{#switch: {{{info}}}

<!--general article properties-->
|       pagename = 
|        variant = 

<!--Required for checklist-->

|            abc =  
|      cat_check = 
|         status = currently no status
|    underlinked = 
|        cleanup = 
|             by = 
|           cat1 = 
|           cat2 = 
|           cat3 = 
|           sub1 = 
|           sub2 = 
|           sub3 = 
|           tab1 = 
|           tab2 = 
|           tab3 = 

<!--required for ToApprove template-->
|    article url = 
|    subpage url = 
|        cluster = 
|            now = 
|     ToA editor = 
|    ToA editor2 = 
|    ToA editor3 = 
|           date = 

<!--required for Approved template-->
|       A editor = 
|      A editor2 = 
|      A editor3 = 

}}<noinclude>{{subpages}}</noinclude>

3) Fill out the "pagename" (the exact title of the article) and "abc" (same as the pagename, but if a biography: last name, first) and preferably "cat1" too (see our workgroup list). If you want to complete the whole checklist section, which would be nice, see The Article Checklist or read the see descriptions below for all the fields in the metadata template. Don't fill out the "required for ToApprove template" and "required for Approved template" sections.

4) You will be prompted to create the two utility pages that are common to all articles; the Talk page and the Approval page.

5) Once the metadata page and both utility pages are created the article cluster is complete. You are finished!

Adding optional subpages to articles already using subpages

  1. Go to the talk page of the article.
  2. Click on the show link next to the label "Unused pages" at the top of the talk page. A list of subpages for the article that have not yet been created, will appear.
  3. Click on the name of the subpage you wish to create. You will see and edit pages with a preloaded {{subpages}} template at the top.
  4. If your intended subpage is not included in the list, see CZ:Article-specific subpages and CZ:How to add a new subpage type.

Removing a subpage from an article

  1. The link to an optional subpage is automatically inserted whenever the file exists, i.e., it will still be displayed if the page is empty (has been blanked).
  2. In order to remove the link from the list (and automatically reinsert it into the list of unused subpages on the talk page template) the page has to be deleted.
  3. Alternatively, in order to save the history, it can be moved to a talk page archive (e.g., of the talk page of this subpage).
  4. Then the redirect created by the move has to be deleted.

Parameters

General parameters

pagename = The exact pagename is used. It is required for navigation back to the home page on subpages.
variant = will be used to designate the spelling and grammar, primarily whether the article is written in AE - American, AuE - Australian, BE - British or CE - Canadian English.

Checklist parameters

abc = used to categorise based on last names. For example, the Barbara McClintock approval template is written as abc = McClintock, Barbara so she is categorised under M, or List of Biologists would be abc = Biologists, List of so it is categorised under B.
cat_check = put "yes" if you want someone to check over the categories
status = 0 for approved articles; 1 developed, 2 developing, 3 stub, 4 external
underlinked = put "yes" if not enough other articles link to it (click "What links here" at left)
cleanup = put "yes" if basic cleanup has been done.
by = obsolete; leave blank
cat1 = must be an existing workgroup
cat2 = second workgroup (optional but must use before group3 if only two workgroups)
cat3 = third workgroup (optional)

ToApprove parameters

Type of approval:
Whole cluster use the article url and the cluster field.
Article only use the article url and leave the cluster field blank.
Subpage only us the subpage url field and leave the cluster field blank.
Article and ONE subpage use both the article and subpage url fields but leave the cluster field blank.
article url = the location in the page history where the version-to-approve lives.
subpage url = the location in the page history where the version-to-approve lives.
cluster = add text here if the whole cluster needs to be approved, otherwise leave blank.
now = the date and time when the template is added. Use ~~~~~ (five tildes) to let the computer generate it automatically.
ToA editor = the username of the person who did the approval (or who nominated the article on behalf of a group of people)
ToA editor2 = second editor (optional field but must use before editor3 if only two editors approved)
ToA editor3 = third editor (optional field)
date = format yyyymmdd (typically three days after "now", to allow copyedits and suggestions)

Approved template

A editor = the username of the person who initiated the approval (or who nominated the article on behalf of a group of people)
A editor2 = second editor (optional field but must use before editor3 if only two editors approved)
A editor3 = third editor (optional field)

Moving an article with subpages

In the event that it is necessary to move or rename an article, it is easiest to move all the related subpages before moving the article itself.

At the moment, the easiest way to find out which subpages the page has (out of the large set of possible ones) is to look at the subpages navigation bar at the top of the article main page. You can simply click on each one in turn to go to them. (If you don't want to use the back button on your browser to get back to the article's main page, once you're done with a subpage, you can right-click on the subpages and open them in new windows/tabs. Note: The subpage navigation bar at the top of the page will cease to function temporarilly once you have moved the page, so you can't use that to get back to the article's main page; don't worry, though, everything will all work again once you're finished.)

Once you're at a subpage, move it to the new name, using the "move" tab (at the very top of the page). (Important: do not ever move a page by cutting and pasting - or copying and pasting - the contents, as this will divorce the content from its edit history. If a move fails, ask a more experience user, or a constable, for help solving your problem.) Note: If any of the subpages have associated Talk: pages, make sure to check the "Move associated talk page" box on the move confirmation page to move them too.

Once you have moved all the 'normal' subpages (kept in the main article namespace), it's time to move the article's Metadata page (which is kept in the Template: name space). The easiest way to get to this page is to go to the article's Talk: page, and click on the yellow "M" button; this will (should?) take you to the Metadata page. Use the "move" tab (as in the paragraph above) to move that to the new name. VERY IMPORTANT: You must change the "pagename =" field in the metadata to the article's new name; you can do this either before, or after, you move the Metadata.

Once you have moved all the other pages, including the subpages and the Metadata page, then it's time to move the article's main page, and its Talk: page. As before, use the 'move' tab at the very top of the page to do this, and again, check to make sure that the "Move associated talk page" box is checked.

You're done! The article should be all at the new name, and everything should work properly.

Other techniques for finding all the subpages

Another technique to find all the subpages is to use the "What links here" function. To to this, go the article's main page, and click on "What links here" at the very bottom of the left-hand column. Among the other pages listed, should be all the article's subpages. Note: This method doesn't work if any of the subpages do not have the proper {{Subpages}} header.

The most robust method is to use a special built-in MediaWiki function. Open the Special:Prefixindex/PAGE_NAME special form in a separate window/tab (so you can continue to read these instructions in this one :-), go into the "Display pages with prefix" input box in that new window/tab, and replace PAGE_NAME with the name of the page you're trying to move. This will definitely show all the subpages. (You can also do this once you think you're done moving all the subpages; it will show if you missed any.)


Citizendium Technical Help
How to edit an article | Searching | Start article with subpages
The Article Checklist | Subpage template

|width=10% align=center style="background:#F5F5F5"|  |}