It looks like I could do

   $GroupName=PageVar($pagename,'$Group',$pagename);

instead of

$pagename=MakePageName($pagename,$pagename);
   $GroupName=PageVar($pagename,'$Group');

Is that true?

- Henrik

Henrik Bechmann wrote:
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

_______________________________________________
pmwiki-devel mailing list
pmwiki-devel@pmichaud.com
http://www.pmichaud.com/mailman/listinfo/pmwiki-devel

Reply via email to