[pmwiki-users] Re: Unifying variables, attributes, properties, part 1

Patrick R. Michaud pmichaud at pobox.com
Wed Dec 14 18:26:11 CST 2005


On Thu, Dec 15, 2005 at 01:06:46AM +0100, chr at home.se wrote:
> On Wed, 14 Dec 2005, Patrick R. Michaud wrote:
> > Thus, my first thought about unification is that we make all of the page
> > variables look like markup variables, so that PHP scripts and PHP
> > templates use {$Group}, {$FullName}, {$PageUrl}, etc. exactly as markup
> > authors would do.  This would help to highlight that these aren't
> > "global variables" in the PHP sense, as well as remove some of the
> > confusion about when to use braces.
> 
> So, to check that I'm following you. You're proposing that the following 
> should be depreceated (and obsoleted within a year or so):
> 
> 	$group = FmtPageName("$Group", $PageName);
> 
> Instead, the argument to FmtPageName() should in this case look as 
> follows:
> 
> 	$group = FmtPageName("{$Group}", $PageName);
> 
> If this is correct, it sounds good to me. :-)

Yes, you have the idea I'm thinking of, except those either need to 
be in single quotes or the '$' needs to be escaped.  :-)

Skin templates would likewise change from $Group to {$Group}.

It's also possible that the older '$Group' form would never be
obsoleted -- we might just leave it as an undocumented feature.

I'm still mulling over how this might play into a general
form of properties and/or attributes, that's the driving factor
for it.

Pm




More information about the pmwiki-users mailing list