I have three wikis running off one MW install (v 1.8.2). Is there a way to have a way in one wiki's page to contain the content of another of my wiki's pages?
I have a help section which I'd like to have on all three wikis, but have to modify just one of them. I guess I could just use php includes, but then that content would exist outside the wiki space.
I tried doing this with interwiki, but could only get that to open the entire page, not just import its content.
Thanks.
Tim
On 28/12/06, Tim Ware tim@hyperarts.com wrote:
I have three wikis running off one MW install (v 1.8.2). Is there a way to have a way in one wiki's page to contain the content of another of my wiki's pages?
Yes, interwiki transclusion.
1. Set up interwiki entries for the wikis where iw_trans = 1 2. Set $wgEnableScaryTranscluding = true; in LocalSettings.php
You'd then transclude as...
{{interwiki:template}} {{interwiki::content}} {{interwiki:namespace:title}}
...where "interwiki" is the interwiki prefix, "template" would be the name of a template on the source wiki, "content" would be the title of a main namespace page, and "namespace:title" is a regular namespace/title pair.
Rob Church
On Dec 28, 2006, at 11:59 AM, Rob Church wrote:
Yes, interwiki transclusion.
- Set up interwiki entries for the wikis where iw_trans = 1
- Set $wgEnableScaryTranscluding = true; in LocalSettings.php
You'd then transclude as...
{{interwiki:template}} {{interwiki::content}} {{interwiki:namespace:title}}
...where "interwiki" is the interwiki prefix, "template" would be the name of a template on the source wiki, "content" would be the title of a main namespace page, and "namespace:title" is a regular namespace/title pair.
Thanks Rob. I think I'm just a bit off. Using phpMyAdmin to edit the db, I set the values to:
iw_prefix: wikihelp iw_url: http://subdomain.mywiki.com/wiki/ (the path to the source wiki) iw_local: 0 iw_trans: 1
In the source wiki I created a template called "Help" (Template:Help)
The wiki I want to pull this content into is a different subdomain on the same server, sharing the same MW install.
Using this:
{{wikihelp:Help}} or {{wikihelp:Template:Help}}
didn't work.
If I changed iw_url: to add "$1" after /wiki/ ( = /wiki/$1)
and used {{wikihelp:Help}}, still no dice.
What am I missing here? Thanks!
Tim
On 28/12/06, Tim Ware tim@hyperarts.com wrote:
Thanks Rob. I think I'm just a bit off. Using phpMyAdmin to edit the db, I set the values to:
iw_prefix: wikihelp iw_url: http://subdomain.mywiki.com/wiki/ (the path to the source wiki)
You need to include $1 somewhere in the path - this indicates where the article is. For instance, http://en.wikipedia.org/wiki/$1 - $1 is replaced with the title to be fetched.
iw_local: 0
See whether setting iw_local = 1 is needed; it's 1 on a local test wiki of mine, but I don't know if it's *required* - will check.
iw_trans: 1
This is in the interwiki table for the wiki you want to transclude the content onto, right?
Rob Church
mediawiki-l@lists.wikimedia.org