[pmwiki-users] edit template for specific pages

noskule noskule at gmx.net
Fri Mar 17 13:07:33 CST 2006


Patrick R. Michaud schrieb:

>On Fri, Mar 17, 2006 at 07:38:28PM +0100, noskule wrote:
>  
>
>>hi list
>>How do I setup a rule that a pagetemplate  will be used if the pagename 
>>is "GroupConfiguration" ? I did try the following, but nothing happens:
>>
>>$GroupConfiguration = '/*\\*.GroupConfiguration/';
>>	if ($action == 'edit' && preg_match($GroupConfiguration, $pagename))
>>	$EditTemplatesFmt = 'Site.GroupConfigurationTemplate';
>>
>>does anyone has a suggestion?
>>    
>>
>
>
>$pagename = ResolvePageName($pagename);
>$name = PageVar($pagename, '$Name');
>if ($name == 'GroupConfiguration') 
>  $EditTemplatesFmt = 'Site.GroupConfigurationTemplate';
>
>Pm
>
>
>  
>
JO, works great, I updated the page: 
http://www.pmwiki.org/wiki/Cookbook/EditTemplates
hope thats right, grz nos




More information about the pmwiki-users mailing list