Test articleA > Signed Articles
From Citizendium, the Citizens' Compendium
Notes on retrieving info from the metadata page
Typically, there are two types of wikicode that can be used to retrieve information from an articles metadata page depending if the metadata is in the article or template namespace. For example, to determine the status of an article (a number between 0-4) we can write:
- {{{{BASEPAGENAME}}/Metadata|info=status}} to give 3, if using a metadata page in the template namespace.
- {{:{{BASEPAGENAME}}/Metadata|info=status}} to give Test articleA/Metadata, if using a metadata page in article namespace (note: this Test article is unusal in that it has two metadata pages, one in article namespace and one in template namespace).
The above code work fine for all pages except sub-subpages (see an example at Test_article/Signed_Articles/Gamma Epsilon). That is because the {{BASEPAGENAME}} magic word does not return the true basepagename (in this case Test article) on the sub-subpage articles but rather a longer version (in this case Test article/Signed Articles). However, there is a way to get the same information from an articles metadata page. The trick is to use the "../../" code to get the true basepagename. For example:
- {{../../Metadata|info=status}}, if using a metadata page in the template namespace.
Although this trick cannot be used to retrieve information if using a metadata page in the article namespace. In other words a subpage version such as Metadata: Since the following:
- {{:../../Metadata|info=status}} does not function if using a metadata page in the article namespace (see test example at Test_article/Signed_Articles/Gamma Epsilon).
Conclusion: Subpage templates can use sub-subpages such as this one if the metadata is stored in the template namespace, however, if the metadata is stored in the article namespace it is not possible to utlise sub-subpages in a cluster AND use the subpages template.
Moving on: Clearly sub-subpages can be used without the subpages template. One solution is to add an alternative header template to these pages. For example, a generic header such as {{subsubpage header}} can be placed at the top all subsubpages (note: this tempalte will only work on subsubpages):
If it is critical to maintain the whole subpages navigation template, with links to the whole cluster of subpages, then we will need to keep the metadata page in the tempalte namespace OR find a new coding trick to allow the subpages template to function correctly on subsubpages.


