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
On 01/02/07, Laszlo Gal laszlo.gal@oracle.com wrote:
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)
Use {{namespace:title}}. For pages in the main namespace (articles), do {{:title}}.
Rob Church
2007/2/1, Laszlo Gal laszlo.gal@oracle.com:
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}}.
See also
http://meta.wikimedia.org/wiki/Help:Template
and
http://en.wikipedia.org/wiki/Wikipedia:Transclusion_costs_and_benefits
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@lists.wikimedia.org http://lists.wikimedia.org/mailman/listinfo/mediawiki-l
John Moorhouse wrote:
<snip>
===[[parentpage/subpage1|subpage1]]=== {{:parentpage/subpage1}} <...> What I have done is used a spreadsheet <...> 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
Hi,
Although you offered the spread sheet to someone else I found the idea very interesting. Is there any possibility I could get a copy?
I don't suffer much from the "not invented here" syndrome, and I find it being just a bright idea to use a spread sheet in this way, and it would be of great value to not have to make my own if someone else already did the trick. I'm very interested.
Regards,
// Rolf Lampa
mediawiki-l@lists.wikimedia.org