[pmwiki-devel] Request to review code for Group Titles recipe

Henrik Bechmann henrik at bechmann.ca
Sat May 17 11:24:51 CDT 2008


All,

I have added a cookbook recipe at 
http://www.pmwiki.org/wiki/Cookbook/GroupTitles which creates the 
functionality of (:title:) for groups, so page titles and group titles 
now have exact analogues:

Group titles (with installation of my recipe) have $GroupTitle and 
$GroupTitlespaced page variables,
    and the page link markup [[target|!+]],
    and are set by page text variable entries in Site.GroupTitles
Page titles have $Title and $Titlespaced page variables,
    and the markup [[target|+]],
    and are set by the (:title:) directive

I've actually deployed this, but I'm not at all confident that the code 
(very little) is properly structured.

I'd be very grateful if folks more knowledgeable than I reviewed the 
code implementation and commented.

For example

$pagename=MakePageName($pagename,$pagename);

looks a little suspicious to me.

The code is at http://www.pmwiki.org/pmwiki/uploads/Cookbook/grouptitles.php

Thanks in advance,

- Henrik

-- 

Henrik Bechmann
bechmann.ca
Webmaster, celos.ca webhosting services




More information about the pmwiki-devel mailing list