(rm example - not really necessary, and adds category tags we don't want.) |
(another example (with a subliminal message to boot!) ;-) |
||
Line 1: | Line 1: | ||
Use <nowiki>{{:PAGENAME}}</nowiki> to transclude a mainspace page. (If you don't use a colon, it calls a [[help:template|template]] instead.) | Use <nowiki>{{:PAGENAME}}</nowiki> to transclude a mainspace page. (If you don't use a colon, it calls a [[help:template|template]] instead.) | ||
This doesn't include a header, so you may want a level 1 header, by adding a single "=" either side of the title, on its own line. (The padding space is optional - i.e. "= Title =" and "=Title=" each on their own line, no quote marks, give an identical output.) | This doesn't automatically include a header, so you may want a level 1 header, either on the calling or transcluded page, by adding a single "=" either side of the title, on its own line. (The padding space is optional - i.e. "= Title =" and "=Title=" each on their own line, no quote marks, give an identical output.) | ||
;Example 1 - heading on calling page | |||
For example: | For example: | ||
Line 9: | Line 11: | ||
This will also include categories from the original page (unless they are inside a <nowiki><noinclude></nowiki> tag where they occur on the original page). | This will also include categories from the original page (unless they are inside a <nowiki><noinclude></nowiki> tag where they occur on the original page). | ||
;Example 2 - heading on transcluded page | |||
The header also can be placed in the page to be transcluded, such as: | |||
<pre>{{:Welcome to Appropedia/Selected project/Nominations}}</pre> | |||
with its category ''not'' transcluded, such as: | |||
<pre> | |||
<noinclude> | |||
[[Category:Welcome to Appropedia|{{SUBPAGENAME}}]] | |||
</noinclude> | |||
</pre> | |||
This produces: | |||
{{:Welcome to Appropedia/Selected project/Nominations}} | |||
[[Category:Appropedia help]] | [[Category:Appropedia help]] |
Revision as of 14:47, 14 December 2011
Use {{:PAGENAME}} to transclude a mainspace page. (If you don't use a colon, it calls a template instead.)
This doesn't automatically include a header, so you may want a level 1 header, either on the calling or transcluded page, by adding a single "=" either side of the title, on its own line. (The padding space is optional - i.e. "= Title =" and "=Title=" each on their own line, no quote marks, give an identical output.)
- Example 1 - heading on calling page
For example:
=Earthing (electrical)= {{:Earthing (electrical)}}
This will also include categories from the original page (unless they are inside a <noinclude> tag where they occur on the original page).
- Example 2 - heading on transcluded page
The header also can be placed in the page to be transcluded, such as:
{{:Welcome to Appropedia/Selected project/Nominations}}
with its category not transcluded, such as:
<noinclude> [[Category:Welcome to Appropedia|{{SUBPAGENAME}}]] </noinclude>
This produces: Welcome to Appropedia/Selected project/Nominations