[pmwiki-users] How do I get the Group for the current page inside of my php function for a markup?

Chris Cox ccox at airmail.net
Mon Sep 5 16:11:33 CDT 2005

H. Fox wrote:
> On 9/5/05, Chris Cox <ccox at airmail.net> wrote:
>>I'm generating the Pagename part... but how do I get
>>the Group?  I know in markup I can use {$Group}, but
>>is there something in PHP land I can use??
> $pagename is the equivalent of {$Group}.{$Name} in markup, so if you do
>     $page_array = explode('.',$pagename);
> $page_array['0'] is the the equivalent of {$Group} in markup.
> $page_array['1'] is the equivalent of {$Name} in markup.
> This is how I do it in light.php.  There's probably a better way...

Yes... but you gave me the hint I needed:

(where $pagename is declared global)

$group = FmtPageName('$Group',$pagename);


More information about the pmwiki-users mailing list