Re: [PHP Template] Recursive hide behavior
| From: | Dan Libby | Date: | Wed, 01 Mar 2000 09:12:53 +0000 |
| Subject: | Re: [PHP Template] Recursive hide behavior | ||
| References: | 1 2 3 4 | Groups: | php.template |
| Request: | Send a blank email to php-template+get-270@lists.php.net to get a copy of this message | ||
Andrei Zmievski wrote:
> I can see several possible things you'd want to do:
>
> 1. Hide if any variable is undefined.
> 2. Hide if any contained section is hidden.
> 3. Hide if a specific variable is undefined.
> 4. Hide if a specific section is hidden.
>
> Or a combination of course. :) The tough thing is to figure out a good and
> easy to remember syntax for this and what to use as the defaul behavior.
> Any comments?
>
> -Andrei
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"
An alternative syntax that may be easier to parse is to have multiple autohide
statements, eg:
{{section:foo autohide="section1" autohide="$var1"}}
However, this seems cumbersome.
$.02
-dan