[pmwiki-users] Ingredients . . .

christian.ridderstrom at gmail.com christian.ridderstrom at gmail.com
Tue Feb 7 11:46:26 CST 2006


On Mon, 6 Feb 2006, H. Fox wrote:

>   ## Get the name of this group (like {Group}) and page (like {$Name})
>   $pagename = ResolvePageName($pagename);
>   $group = PageVar($pagename, '$Group');
>   $name = PageVar($pagename, '$Name');

Slightly off-topic here... is there a drawback to the solution above?
What I mean is that it (partly as a side-effect) assigns $pagename which 
might not be desired, or?

Perhaps it's a simple as that we really want two code snippets here:

	## Get a proper pagename
	$pagename = ResolvePageName($pagename);



	## Get the name of this group (like {Group})
	## Note that this assumes you have resolved $pagename properly
	$group = PageVar($pagename, '$Group');

Or maybe the snippet should instead be:

	## Get the name of this group (like {Group})
	$group = PageVar(ResolvePageName($pagename), '$Group');



/Christian

-- 
Christian Ridderström, +46-8-768 39 44               http://www.md.kth.se/~chr






More information about the pmwiki-users mailing list