Re: [PHP Template] Recursive hide behavior

From: Date: Wed, 01 Mar 2000 14:28:24 +0000
Subject: Re: [PHP Template] Recursive hide behavior
References: 1 2 3 4 5  Groups: php.template 
Request: Send a blank email to php-template+get-276@lists.php.net to get a copy of this message
On Wed, 01 Mar 2000, Dan Libby wrote: > From a syntax perspective, 3 & 4 should be identical, so long as both have unique > ids. 1 & 2 are nice to have, but not strictly necessary, since all > variables/sections could be explicitly listed. For completeness, none should also > be an option, even though it is the default. (HTML usually works that way) > > So I would see the syntax as looking like: > > autohide="all" or > autohide="sections" or > autohide="vars" or > autohide="$section1" or > autohide="$section1,$var1" or > autohide="sections,$var1" or > autohide="vars,$section1" Well, I don't think we should put $ in front of sections... They are not really variables. We'd have to do something like: autohide=#vars,section1 But #vars is not really a variable. Hmm, maybe autohide=<variables>/<sections>, some examples: autohide=all autohide=vars/section1 autohide=$var1,$var2/sections Or use ':' instead of '/', and use '/' for referring to section variables like $section1/foo. Sort of like a 'path' to a variable. > An alternative syntax that may be easier to parse is to have multiple autohide > statements, eg: > > {{section:foo autohide="section1" autohide="$var1"}} I thought about this, but then what if you have autohide="$var1" autohide="all"? Ambiguity land. BTW, I was thinking we'd use " only for constant strings, not to delimiter attribute values. -Andrei "Later in this talk, I intend to define the universe and give three examples." -- Larry Wall

« previous php.template (#276) next »