Hi
I would like to create a template which adds automatically a link from a subpage (e.g. Article/Subpage) to his parent page (Article). Doesn't there exist a corresponding variable for that? See http://www.mediawiki.org/wiki/Help:Variables
Any other suggestions how to solve that problem?
Thanks Ponte
ponte wrote:
Hi
I would like to create a template which adds automatically a link from a subpage (e.g. Article/Subpage) to his parent page (Article). Doesn't there exist a corresponding variable for that? See http://www.mediawiki.org/wiki/Help:Variables
Any other suggestions how to solve that problem?
Thanks Ponte
[[{{NAMESPACE}}:{{BASEPAGENAME}}]]
Platonides schrieb:
[[{{NAMESPACE}}:{{BASEPAGENAME}}]]
I tried that already. But if I have a page Article/Subpage, {{BASEPAGENAME}} evaluates to Article/Subpage an not only Article. Whats wrong here? MediaWiki Version: 1.11.0
2008/1/29, ponte@expliki.org ponte@expliki.org:
Whats wrong here?
You have to turn on namespace subpages [1] to make it work. If you don't, there is no way to extract the subpage title, since there are no subpages in namespace in question.
(I was writing this in my letter, but Platonides replied ahead of me.)
— Kalan
[1] http://www.mediawiki.org/wiki/Manual:%24wgNamespacesWithSubpages
Kalan schrieb:
You have to turn on namespace subpages [1] to make it work. If you don't, there is no way to extract the subpage title, since there are no subpages in namespace in question.
I see. There are already subpages in the form of article/subpage. Is it a roblem to enable $wgNamespacesWithSubpages afterwards? If $wgNamespacesWithSubpages isn't enabled, an article in the form article/subpage ist equivalent to a normal article without a subpage, right?
2008/1/29, ponte@expliki.org ponte@expliki.org:
I see. There are already subpages in the form of article/subpage. Is it a roblem to enable $wgNamespacesWithSubpages afterwards?
No, the only thing you need is to set the variable — everything is done automatically. I've just tested it on my local wiki.
If $wgNamespacesWithSubpages isn't enabled, an article in the form article/subpage ist equivalent to a normal article without a subpage, right?
If I interpret "ist" as "is", you're absolutely right. This is done to allow titles such as [[TCP/IP]] or [[9/11]].
— Kalan
Kalan schrieb:
2008/1/29, ponte@expliki.org ponte@expliki.org:
I see. There are already subpages in the form of article/subpage. Is it a roblem to enable $wgNamespacesWithSubpages afterwards?
No, the only thing you need is to set the variable — everything is done automatically. I've just tested it on my local wiki.
If $wgNamespacesWithSubpages isn't enabled, an article in the form article/subpage ist equivalent to a normal article without a subpage, right?
If I interpret "ist" as "is", you're absolutely right. This is done to allow titles such as [[TCP/IP]] or [[9/11]].
Ok. Thank you! And sorry for my bad english. Ponte
mediawiki-l@lists.wikimedia.org