[pmwiki-users] (:include:) works at site level only

Petko Yotov 5ko at 5ko.fr
Sun Jul 15 06:42:55 CDT 2012


The first things I thought about were mentioned by Tamara in an earlier  
message.

Wikigroups were created exactly for this reason, to be able to have a number  
of semi-indepentend wiki sites, each with its own sidebar, header, footer,  
skin, even editors and permissions. If you could use Wikigroups instead of  
separate fields in a farm, you would save yourself a lot of work.

Alternatively, it is possible to include all of the rootwiki pages into the  
fields without copying them. If you use a wikifarm, a single pmwiki.php file  
and a number of field index.php files which include it, in each  
field/local/config.php file you could use something like this:


  $WikiLibDirs = array(
    &$WikiDir,
    new PageStore('$FarmD/wiki.d/{$FullName}'), # path to rootwiki/wiki.d
    new PageStore('$FarmD/wikilib.d/{$FullName}')
  );

This will make sure that each field contains all pages from the root wiki.  
If you edit any such page from a field, it will be cloned to the field and  
the changes will not affect the same page content in the root wiki or the  
other field wikis. If you want to edit any rootwiki page from a field and  
actually modify it, you use a different line in the above snippet:

  new PageStore('$FarmD/wiki.d/{$FullName}', 1), # writable rootwiki/wiki.d

Yes, there are at least two recipes which seem to do what you ask for. I  
haven't tested or reviewed any of them, but they may work for you:

  http://www.pmwiki.org/wiki/Cookbook/Sisterly
  http://www.pmwiki.org/wiki/Cookbook/IncludeFieldPage

Petko

fergicide writes:
> One issue I'm constantly running into (and haven't solved) is trying to pull  
> in wiki content from other sites.
>
> ...rootwiki
> ......story1
> ......story2
> ......story3
>
>
> When I create a new 'story' sub site, I copy the root wiki.d folder (which is  
> basically my story sites template) to the new subfolder and go from there.
>
>
> My problem is, for these story sites I have pages that ideally would pull in  
> part of their content from the rootwiki site, to avoid duplication and ensure  
> changes to the rootwiki page automatically reflect in the child sites.
>
>
> Ideally I could use (:include wikiroot:grouppage.page:) where wikiroot is  
> defined in farmmap.txt and points to the root wiki, or something like that,  
> but of course :include: only works at the site level.  I don't want to use an  
> iframe via HTML.
>
>
> Have I overlooked an existing solution?
>
>
> Many thanks for any ideas.
>
>
> Cheers,
> Andrew, longtime pmwiki user.
>
>



More information about the pmwiki-users mailing list