[pmwiki-users] Templates question - answered

Ian MacGregor lists at imacgregor.com
Sun Jul 22 19:59:44 CDT 2007


> I am using the following in config.php:
>
> ## This settings adds the content of Site.SiteHeader
> ## into the header of every page that is created.
> $GroupHeaderFmt = '(:include {$SiteGroup}.SiteHeader
> basepage={*$FullName}:) (:nl:)' . $GroupHeaderFmt;
>
> ## This settings adds the content of Site.SiteFooter
> ## into the footer of every page that is created.
> $GroupFooterFmt = '(:include {$SiteGroup}.SiteFooter
> basepage={*$FullName}:) (:nl:)' . $GroupFooterFmt;
>
> ## This setting causes PmWiki to use "Site.HomePageTemplate"
> ## anytime an author creates a page named "HomePage".
> $EditTemplatesFmt = '{$SiteGroup}.{$Name}Template';
>
> I have a group named Cooking (food) and have created a
> Cooking.RecipeTemplate. What I'd like to do is create a setting in
> config.php that automatically adds the content of Cooking.RecipeTemplate
> into any page that is created in the Cooking group. This will assist
> authors in creating new cooking recipes that are uniform in appearance.
>
> I tried:
>
> $EditTemplatesFmt = 'Cooking.RecipeTemplate';
>
> But that overrides the above setting for the HomePage. Once I learn how to
> do this, I can use that info to make other templates.
>
> Any idea how to do this?
I learned, from Xes, that I can create local/Cooking.php and put this in it:

$EditTemplatesFmt = 'Cooking.RecipeTemplate';

That will do exactly what I wanted while leaving the HomePage template 
intact :)

Thanks crisses :)

Regards,
Ian MacGregor

-- 
http://www.imacgregor.com
MacGregor Despite Them!



More information about the pmwiki-users mailing list