Help:Embed page
This page describes the steps necessary to embed a page within another page. See also Help:Template.
Contents |
[edit] Syntax
{{Namespace:Pagename}}
If you do not provide a namespace, the Template namespace will be used. For the pages in the main namespace, add a colon before the page name.
[edit] Example
{{:Sample Page}} produces the following, which displays the contents of Sample Page inside the box:
This page is a sample page, used as an example in Help:Embed_page.
The box was created, (as with any wikitext transcluded or not) by indenting {{:Sample Page}} here, by one space on a new line. Here is the same transclusion, with the newline, but without the indention: This page is a sample page, used as an example in Help:Embed_page.
You can verify these things by looking directly at the Sample Page and by editing this section.
[edit] Embedded Special Pages
The default install of MediaWiki allows you to embed only selected special pages. (See Help:Special_pages#Miscellaneous.) To include an otherwise "unembedable" special page, you must edit the $mList array in the file includes/SpecialPage.php. Each entry is in the format
'Pagename' => array( 'PageType', 'Pagename')
The possible values for PageType are SpecialPage, UnlistedSpecialPage, and IncludableSpecialPage.
Find the entry for the page you want to embed and change the PageType to IncludableSpecialPage. You will now be able to include/embed the special page using the include syntax: {{Special:Pagename}}.
- Note: changing an
UnlistedSpecialPagewill show it in Special:Specialpages. (Can this array be changed to allow multiple page types?)
[edit] Generated Lists
See: Help:Generated lists
[edit] Embedded Images
See: Help:Images