Re: Internal Variables
| From: | Alexander, Jason | Date: | Fri, 23 Feb 2001 15:47:01 +0000 |
| Subject: | Re: Internal Variables | ||
| Groups: | php.smarty.general | ||
| Request: | Send a blank email to php-smarty-general+get-203@lists.php.net to get a copy of this message | ||
Thanks Andrei for the prompt response.
Hrm, that's unfortunate. Hopefully (for self-serving reasons :D) you guys
can get that in the next release.
But, I understand your problem. Once you get into parsing the section
directives, how do you (cleanly & easily) handle global directives, such as
"declare", "set", and "unset" directives, hypothetically.
Hrmmm....
-----Original Message-----
From: Andrei Zmievski [mailto:andrei@ispi.net]
Sent: Friday, February 23, 2001 9:30 AM
To: Alexander, Jason
Cc: 'smarty@lists.ispi.net'
Subject: [smarty] Re: Internal Variables
On Fri, 23 Feb 2001, Alexander, Jason wrote:
> I'm attempting to present data grouping, and am wondering if there is any
> way to assign internal template variables other then section variables?
>
> In other words, I have the follow data:
>
>
> group1 thing1
> group1 thing2
> group1 thing3
> group2 thing4
>
> I'm guaranteed to get contiguous groups, but I need to be able to display
> the groupings as so:
>
> Group1
> : thing1
> : thing2
> : thing3
>
> Group2
> : thing4
>
>
> Hence the need to be able to define a $lastGroup variable, and check to
see
> if it has changed each itteration. If it has, display the new group
heading.
>
> I did do my reading this time :D and found the % vars but from what I read
> that only covers section properties, at the moment.
There is no way to do this currently, but we're going to be thinking
about some possible implementations. The biggest problem is defining new
syntax for accessing non-current element of an array...
-Andrei
* Only 19,999 lines of C++ to my next ski trip... *
---
You are currently subscribed to smarty as: jalexander@aivia.net
To unsubscribe send a blank email to $subst('Email.Unsub')
Visit Smarty's homepage at http://www.phpinsider.com/php/code/Smarty/