[pmwiki-users] Different Templates for $Group

Jose Carlos Castellano josecarlos.castellano at bitboxonline.com
Fri Mar 11 06:07:05 CST 2005


 

Hi Tom!

 

Thanks dude, you're so polite, and the one and only,

 

This thread exited to nobody, except you.

 

I will try .

 

Thanks!

 

 

 

>             I need different configurations for my different Groups 

> "newpages".

 

The trick that I am using is as follows:

 

I want users to be able to add items to a list, and then have 

different templates for different lists.  Everything is in one group.

 

So, let's say we are in a group called "Grp".  There's a page called 

"Grp/TheItems" containing a bullet list of items.

 

Create local/Grp.php, containing:

 

<?php if (!defined('PmWiki')) exit();

 

if ($pagename == "Grp.TheItems") {

         $LinkPageCreateFmt =

                 "<a class='createlinktext' 

href='\$PageUrl?action=edit&template=Template.Item'>\$LinkText</a><a 

class='createlink'>?</a>";

}

 

?>

 

Put your template in Template/Item.

 

Now, a user edits the bullet list in Grp/TheItems, and adds a new 

item.  The new page's edit link, when clicked, will automatically load 

the template appropriate for that list.

 

I'm sure you can see how to apply this to different groups.

 

-- 

Dr. Tom Holroyd

"A man of genius makes no mistakes. His errors are volitional and

are the portals of discovery." -- James Joyce

 

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: /pipermail/pmwiki-users/attachments/20050311/747cfbf0/attachment.html 


More information about the pmwiki-users mailing list