[pmwiki-users] Category.GroupTemplate and $AutoCreate
David Spitzley
dspitzle at wash.k12.mi.us
Mon Nov 24 07:56:57 CST 2008
Thanks, I dug that out of the archives after asking my question. I've added it to the documentation in the Edit Variables page.
David
>>> noskule <noskule at gmx.net> 11/24/2008 5:11 AM >>>
Am Samstag 22 November 2008 17:48:00 schrieb David Spitzley:
> I want to use the $AutoCreate feature with my Category pages, but I would
> like to have it use the Category.GroupTemplate that I set up. Any
> suggestions on how to do this? The AutoCreateTargets() function on line
> 1713 of pmwiki.php clearly handles the AutoCreate requests, while
> EditTemplate() on line 1583 seems to deal with GroupTemplates, but I don't
> know how to mesh the two.
>
>
> David
>
try something like this:
$page = ReadPage("GroupTemplate.$CategoryGroup", READPAGE_CURRENT);
$AutoCreate["/^$CategoryGroup\./"] = array(
'ctime' => $Now,
'text' => $page['text']
);
grz nos
> _______________________________________________
> pmwiki-users mailing list
> pmwiki-users at pmichaud.com
> http://www.pmichaud.com/mailman/listinfo/pmwiki-users
More information about the pmwiki-users
mailing list