[pmwiki-users] Templates revisited
Patrick R. Michaud
pmichaud at pobox.com
Thu Mar 31 08:03:42 CST 2005
On Thu, Mar 31, 2005 at 02:38:50PM +0300, Jan-Henrik Johansson wrote:
> OK, I got my $EditTemplatesFmt = '$Group.Template' into my farmconfig.php
> and I got a Profiles.Template in every wiki.d of the farm. This works
> as intended. But, in pmwiki we are used to common defaults and local
> overrides. I therefore thought I should put only one Profiles.Template
> somewhere, and then all wikis that don't have any in their wiki.d
> would use this default. And those wikis that have one in their wiki.d
> would use their own version to override the default. Putting a
> default template in the wiki.d of pmwiki/ did not function farm-wide
> so did I missconfigure something? Should templates perhaps be
> together with skins?
Oh, I hope not! Let's back up...
Edit templates are just wiki pages, the same as any other, and they're
normally read from wiki.d/ . We normally don't want all of a farm's
pages in its wiki.d/ to be showing up in every field (although it can
be done, as I'll show in a bit). However, the pages that appear in
wikilib.d/ *are* normally shared among the fields in a farm, so an
easy way to get a page to be farm wide is to copy the template's page file
from wiki.d/ into wikilib.d/ . Then it'll be there by default for
all fields in the farm (unless/until they've created their own local
copies of the page).
However, an administrator might choose to use a farm to do nothing but
hold pages that are to be shared by every field in the farm. This
can be done by adding the following line to local/farmconfig.php:
$WikiLibDirs = array(&$WikiDir,
new PageStore('$FarmD/wiki.d/$FullName'),
new PageStore('$FarmD/wikilib.d/$FullName'));
This tells each field to first look for pages in the local wiki.d/,
then in the farm's wiki.d/, and finally in the farm's wikilib.d/ .
So, any pages created/edited in the farm's wiki will appear in each
field's wiki.
How's that?
Pm
More information about the pmwiki-users
mailing list