[Mediawiki-l] How to include page contents into one "integration page"?

John Moorhouse john.moorhouse at 3jays.me.uk
Thu Feb 1 19:03:35 UTC 2007


The effective code is {{namespace:pagename}}, so for something in the 
main name space you need {{:pagename}}

I actually use this code
===[[Pagename1]]===
{{:pagename1}}
===[[Pagename2]]===
{{:pagename2}}
===[[Pagename3]]===
{{:pagename3}}

as it build a nice structure including a TOC at the top of the all in 
one page.

We have a number of index pages in the main namespace that use 
subpages,( but I can't answer your query over performance), that are

[[/subpage1/]]
[[/subpage2/]]
[[/subpage3/]]
[[/subpage4/]]
[[/subpage5/]]

and the all in one page is

===[[parentpage/subpage1|subpage1]]===
{{:parentpage/subpage1}}
===[[parentpage/subpage2|subpage2]]===
{{:parentpage/subpage2}}
===[[parentpage/subpage3|subpage3]]===
{{:parentpage/subpage3}}

What I have done is used a spreadsheet so that my editors can paste the 
index page code as above, and the spreadsheet then produces the all in 
one page code for them, which they can then just copy & paste it also 
will add a link to the all in one page to the index page as well, we 
have done this by creating a new name space 'all' so that the all in one 
page for a page 'index page 1' becomes 'all:index page 1', this also 
means that we can by default have the search ignore the all: pages 
(saved duplicate entries.)
The spread sheet will also allow editors to create simple tables as 
well, they just put their cell contents in the spreadsheet and copy the 
resulting wikitext to the wiki.

If you want a copy of the spreadsheet your welcome.

Ta

John

Laszlo Gal wrote:
> Hi, I'm new to mediawiki, and tried to figure out how can I integrate
> the content of more elementary pages into one single page (mainly for
> printing purposes) using some "include" directive like thing, similar to
> the {{pagename}}.
> The problem for me is that in this case it tries to include the
> Template:pagename template page content. (Understood that this is the
> normal behaviour)
>
> I found that if I have a sub-page, under "integrating_page" like
> /subpage and put the {{/subpage}} into the integrating_page, then it
> works, however sub pages are not allowed by default on the Main namespace.
> - Is there any option different from this subpage thing in mediawiki, or
> what I'm up to is completely alien from mediawiki's nature?
> - If only this subpage trick works, is there any drawback (in search
> performance or other) to enalbe subpages for the Main namespace by
> adding the
>
> --------8<--------8<--------8<--------8<
> $wgNamespacesWithSubpages += array(
>         NS_MAIN => true,
>         );
> --------8<--------8<--------8<--------8<
>
> section to the LocalSettings.php?
>
> Thanks,
> Laszlo
>
> _______________________________________________
> MediaWiki-l mailing list
> MediaWiki-l at lists.wikimedia.org
> http://lists.wikimedia.org/mailman/listinfo/mediawiki-l
>   




More information about the MediaWiki-l mailing list