FYI,<div>on page <a href="http://pmwiki.org/wiki/PmWiki/LocalCustomizations">http://pmwiki.org/wiki/PmWiki/LocalCustomizations</a></div><div><br></div><div><a href="http://pmwiki.org/wiki/PmWiki/LocalCustomizations"></a>I found the following (just shows you have to know where to look)</div>
<div><br></div><div><span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif; font-size: 15px; line-height: 19px; "><p class="vspace question" style="margin-top: 1em; margin-bottom: 0.75em; margin-left: 0px; margin-right: 0px; font-weight: bold; ">
How do I get the group / page name in a local configuration file (e.g. <em>local/config.php</em>)?</p><p style="margin-top: 0px; margin-bottom: 0px; margin-left: 2em; ">Use the following markup in pmwiki-2.1.beta21 or newer:</p>
<div class="vspace" style="margin-top: 1.33em; "></div><div class="indent" style="margin-left: 40px; "><pre class="escaped" style="font-size: 0.9em; font-family: &#39;Lucida Console&#39;, &#39;Andale Mono&#39;, &#39;Courier New&#39;, Courier, monospace; line-height: 1.2em; margin-top: 0px; margin-bottom: 0px; margin-left: 2em; ">
## Get the group and page name
$pagename = ResolvePageName($pagename);
$page = PageVar($pagename, &#39;$FullName&#39;);
$group = PageVar($pagename, &#39;$Group&#39;);
$name = PageVar($pagename, &#39;$Name&#39;);</pre><pre class="escaped" style="font-size: 0.9em; font-family: &#39;Lucida Console&#39;, &#39;Andale Mono&#39;, &#39;Courier New&#39;, Courier, monospace; line-height: 1.2em; margin-top: 0px; margin-bottom: 0px; margin-left: 2em; ">
<br></pre><pre class="escaped" style="font-size: 0.9em; font-family: &#39;Lucida Console&#39;, &#39;Andale Mono&#39;, &#39;Courier New&#39;, Courier, monospace; line-height: 1.2em; margin-top: 0px; margin-bottom: 0px; margin-left: 2em; ">
<br></pre></div></span>cheers</div><div><br></div><div>Simon</div><div><br><div class="gmail_quote">2009/9/13 Petko Yotov <span dir="ltr">&lt;<a href="mailto:5ko@5ko.fr">5ko@5ko.fr</a>&gt;</span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div class="im">On Saturday 12 September 2009 07:06:09 Simon wrote:<br>
&gt; In config.php I have<br>
&gt;   $WikiDir = new PageStore(&#39;wiki.d/$Group/$FullName&#39;);<br>
&gt;   $LockFile = &quot;/home/tahi/public_html/pmwiki/wikishared.d/.flock&quot;;<br>
&gt;   $WikiLibDirs = array(<br>
&gt;      &amp;$WikiDir,<br>
&gt;      new<br>
&gt; PageStore(&#39;/home/tahi/public_html/pmwiki/wikishared.d/$Group/$FullName&#39;,<br>
&gt;  1), new PageStore(&#39;$FarmD/wikilib.d/$FullName&#39;));<br>
&gt;<br>
&gt; What I want to achieve is having some shared groups of pages that can be<br>
&gt; updated and added to (ie new pages) from both websites.<br>
&gt; Where a group is not in the shared directory I want it to update the local<br>
&gt; website folder (this happens now).<br>
</div>...<br>
<div class="im">&gt; existing pages are updated in their existing locations, but new<br>
&gt; pages are added in to local folder.<br>
</div>...<br>
<div class="im">&gt; If anyone can suggest how I can have all new pages in a shared group only<br>
&gt;  be added the the shared directory I would appreciate it<br>
<br>
</div>You can re-define the $WikiLibDirs array in two local/SharedGroup.php files in<br>
both wikis:<br>
<br>
&lt;?php<br>
## only alter the directories when a page is posted in this group<br>
if (@$_REQUEST[&#39;action&#39;]==&#39;edit&#39;<br>
  &amp;&amp; preg_grep(&#39;/^post/&#39;, array_keys($_REQUEST) ) ) {<br>
  $WikiDir = new PageStore(&#39;$FarmD/shared.d/$FullName&#39;);<br>
  $WikiLibDirs = array(  &amp;$WikiDir,<br>
    new PageStore(&#39;$FarmD/wikilib.d/$FullName&#39;)  );<br>
<div class="im">}<br>
<br>
&gt; I can test for a pagename in config.php by using   $pagename =<br>
&gt; ResolvePageName($pagename);<br>
&gt; How can I test for a groupname in config.php?<br>
<br>
</div>You can get the group by something like this (at the end of config.php):<br>
<br>
  list($group, $name) = explode(&#39;.&#39;, ResolvePageName($pagename));<br>
  if ($group==&#39;PmWiki&#39;) { /*do something...*/}<br>
<font color="#888888"><br>
Petko<br>
</font></blockquote></div><br><br clear="all"><br>-- <br>____<br><a href="http://kiwiwiki.co.nz">http://kiwiwiki.co.nz</a><br>
</div>