[pmwiki-users] different defaultpages for different groups
Patrick R. Michaud
pmichaud at pobox.com
Wed Dec 6 10:53:03 CST 2006
On Wed, Dec 06, 2006 at 04:21:18PM +0000, Hans wrote:
> Wednesday, December 6, 2006, 3:37:45 PM, Florian wrote:
>
> > by setting $Defaultname = 'XXX' i set the default page for each group.
>
> > Is it possible to specify this a little bit?
> > Group A has defaultpage X
> > Group B has defaultpage Y
>
> Set $DefaultGroup for each group in its own local/GroupA.php, local/GroupB.php
> file.
Alas, this won't work, because by the time PmWiki gets around to
loading the per-group customizations it will have already resolved
the pagename. In general, $DefaultGroup and $DefaultName only work
when called from local/config.php .
Also, I think Florian's request is a little more complex than this,
because he may want PmWiki to know about each group's home page even
from other groups. In such cases the per-group PHP file isn't called,
and $DefaultName won't be correct for the external wikigroup.
The simplest solution is to simply use the same default home page
in every group, but then use (:redirect:) to go from some home
pages to the correct default.
Anything beyond that will likely require some substantial modification
or customizations to $MakePageNamePatterns or $MakePageNameFunction ,
so that PmWiki can look up the correct home page based on whatever
group is being requested.
Pm
More information about the pmwiki-users
mailing list