Template:Subpage

From PCSAR

Revision as of 17:47, 29 February 2012 by Brett Wuth (Talk | contribs)
(diff) ←Older revision | Current revision (diff) | Newer revision→ (diff)
Jump to: navigation, search

This is the documentation for the template Template:Subpage

Template:Subpage/Doc:

The template {{Subpage|name|title}} creates a link to a subpage of the current page.

Subpages are regular wiki pages.

But their name is the same as their parent page with some additional material on the end, separated by a slash "/". For instance "Template:Link/Doc" is a subpage of "Template:Link".

You can create a link to a subpage with square brackets by starting it with a slash.

For instance, on a page called "Meetings" you might have:

* [[/2011-02-11]]
* [[/2011-03-17]]

The links will appear with the slash in their name, which is somewhat distracting:


You type... You get...
[[/2011-02-11]] 
/2011-02-11


You can clean that up by providing an explicit link text:


You type... You get...
[[/2011-02-11|2011-02-11]] 
2011-02-11


But that's repetitive and difficult to read with longer subpage names.

Instead you can use


You type... You get...
{{subpage|2011-02-11}}    
2011-02-11


The link doesn't show with a slash.

Finally, if you want, you can give an explicit link text:


You type... You get...
{{subpage|2011-02-11|Feb 11}}    
Feb 11



To see how this template is implemented, edit this page and examine the portion between <includeonly> and </includeonly>.

Personal tools