[pmwiki-users] Ingredients . . .

christian.ridderstrom at gmail.com christian.ridderstrom at gmail.com
Tue Feb 7 15:16:19 CST 2006


On Tue, 7 Feb 2006, Patrick R. Michaud wrote:

> On Tue, Feb 07, 2006 at 06:46:26PM +0100, christian.ridderstrom at gmail.com wrote:
> > 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?
> 
> There's not really a drawback that I can see.  Even if the admin doesn't
> perform $pagename = ResolvePageName($pagename), then PmWiki will do it
> as soon as local.php has finished executing so that it can then start
> loading per-group and per-page customizations.

Does that imply that the variable $pagename is 'globally' available for 
per-group and per-page customization scripts?

Btw, is this "flow" of how scripts are invoked documented somewhere? It 
might be useful to be able to refer to it when saying something like:

	And after 'local.php' has been executed, the variable $pagename
	contains the group/name of the current page. See ?? for details
	on the order that customization scripts are invoked.

/Christian

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






More information about the pmwiki-users mailing list