All groups Navigation |
Group Customizationsadministrators (intermediate) One of the purposes of Wiki Groups is to allow a Wiki Administrator to customize the features of PmWiki on a per-group basis. Here is where per group customizations come into play. Group-specific PHP and CSSThe The To perform local customizations for a particular WikiGroup,
These files will be automatically processed after processing any local customizations in the For example, to change the image displayed in the upper-left corner of pages in the " <?php $PageLogoUrl = "/myimages/chess.gif"; The example's effect would cause all pages in the To add markup to the beginning or end of each page in a wiki group, see Group headers. Per-page customizations PmWiki also allows per-page customizations; simply use the full name of the page to be customized instead of the group. For example, one can use the file Almost any customization that would be placed in An important exception to this is setting per-group or per-page customizations for recipe scripts included in ## Inclusion of per-page and per-group local php scripts $pagename = ResolvePageName($pagename); include_once("$FarmD/scripts/pgcust.php"); $page = PageVar($pagename, '$FullName'); $group = PageVar($pagename, '$Group'); //per-group customizations: if($group=='GroupName') { $RecipeVariable = 'valueA'; etc. ... } //per-page customizations: if($page=='GroupName.PageName') { $RecipeVariable = 'valueB'; etc. ... } //include recipe after variables are set: include_once('cookbook/recipescript.php'); Required reading: Order of the commands in Note that this method cannot be used to set Processing orderFor all local customizations, PmWiki first processes the Custom CSS styles per group or per-pageTo apply CSS styles to pages of a specific group named body { background: #F4C4B4; } See also Preventing group-Level configurationsAny customization file can set AuthenticationAny passwords required for a group should be set in the group's Group Attributes? page (see Passwords Administration) and not in a group customization file. Consider Wiki FarmsWiki Groups are an easy way to host multiple sites in a single PmWiki installation by giving each site its own group. Another approach is to use Wiki Farms, which allows each site to have its own set of Wiki Group and local customization files. If you are looking for nested group levels, you may want to consider Pm's design considerations on hierarchical groups. FAQHow can I apply CSS styles to a particular group or page? Simply create a Why shouldn't passwords be set in group (or page) customization files? Why shouldn't group or page passwords be set in The reason for this advice is that per-group customization files are only loaded for the current page. So, if
and because the The same is true for page customization files. Isn't that processing order strange? Why not load per page configuration last (that is after global configuration an per group configuration)? Many times what we want to do is to enable a certain capability for a group of pages, but disable it on a specific page, as if it was never enabled. If the per-group config file is processed first, then it becomes very difficult/tedious for the per-page one to "undo" the effects of the per-group page. So, we load the per-page file before the per-group. If a per-page customization wants the per-group customizations to be performed first, it can use the techniques given above (using This page may have a more recent version on pmwiki.org: PmWiki:{*{$Name}]], and a talk page: [[PmWiki:{*$}Name}-Talk. |