[pmwiki-users] Re: Empty $pagename (Was: variables for customization)

chr at home.se chr at home.se
Fri Jul 8 01:57:00 CDT 2005


On Thu, 7 Jul 2005, Patrick R. Michaud wrote:

> On Fri, Jul 08, 2005 at 12:27:31AM +0200, chr at home.se wrote:
> > Oh.. this might explain quite a few bugs actually. I'm guessing this is
> > not a fact that's well known...  PmWiki.BasicVariables could do with a
> > note about this as well. Would you say that $pagename deserves it's own 
> > page just like FmtPageName()?
> 
> I don't think it deserves its own page -- it could probably go
> in PmWiki.BasicVariables.

Ok. Btw, here's what it says right now:

	$PageName
	The name of the current page being shown/edited/otherwise acted
	upon. Examples: 'SideBar', 'HomePage'. 
	See also $FullName and $Group.

Should it really be 'PageName'... and should it refer to $FullName and
$Group? Seems like some $-substitutions have been intermixed with the PHP
variables here, or is the whole page about $-substitions?

> > What's the recommended way for scripts to deal with this?  (I'm talking
> > about scripts that might be invoked by config.php)
> 
> I don't have a recommended way for this.  Based on the discussions
> of the past couple of days I'm thinking that I'll create a SetPageName()
> function, which initializes $pagename as well as $group and $name.

Eh.. $group and $name... do you mean that SetPageName() will create these 
as global variables?

Would work for me though, although now that I've thought about it I think 
that Group() is a bit cleaner (and you can't assign it).

/Christian

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





More information about the pmwiki-users mailing list