[pmwiki-devel] Request to review code for Group Titles recipe
Henrik Bechmann
henrik.bechmann at sympatico.ca
Sat May 17 12:21:08 CDT 2008
Hans has pointed out that Pm has an older version of a similar idea at
http://www.pmwiki.org/wiki/Cookbook/GroupTitle, but that was written
before PTV's were invented, and it doesn't include the [[target|!+]]
markup which is essential for my application (pagelist templates and the
like). IAC I've added a cross reference to Pm's version on my recipe page.
But I'm really mostly wanting confirmation that my code is OK. So far it
looks fairly analogous to Pm's code...
More comments?
- Henrik
Henrik Bechmann wrote:
> 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