[pmwiki-users] Re: Re: variables for customization
Patrick R. Michaud
pmichaud at pobox.com
Thu Jul 7 08:55:30 CDT 2005
On Thu, Jul 07, 2005 at 11:21:22AM +0200, chr at home.se wrote:
> I see that you read something much more complicated into my proposal than
> what I intended... I'm simply suggesting that pmwiki.php make a function
> available that is called 'Group()'. It should basically work like this:
>
> $grp = Group(); // Case 1
> $grp = Group("PmWiki.SomePage"); // Case 2
So, you're basically saying that Group() should be a shortcut for
writing FmtPageName calls...?
$grp = Group(); # $grp = FmtPageName('$Group', $pagename)
$grp = Group($p); # $grp = FmtPageName('$Group', $p)
I guess I can live with this. What other helper functions are
needed? Name()? FullName()?
> Or possibly
>
> $FPLByGroupIFmt = "<dd><a href='%PageUrl%'>%Name%</a></dd>\n";
This gets back to the "when do I use %...%" versus when do I use
$... argument? For those who really want to see the difference --
go look at a skin template.
> Ok, then that's settled. And I think that in general if we just say
> "variables", we should be referring to PHP variables. This means we should
> make an effort to say something else when we are not referring to PHP
> variables.
In general I've always tried to consistently use the term "variable"
for PHP variable, "$-substitution" or "substitution" for the
special $-items in FmtPageName, and "markup" for things like
{$Group} and {$FullName}.
Pm
More information about the pmwiki-users
mailing list