Re: Internal Variables
| From: | Andrei Zmievski | Date: | Fri, 23 Feb 2001 15:30:11 +0000 |
| Subject: | Re: Internal Variables | ||
| References: | 1 | Groups: | php.smarty.general |
| Request: | Send a blank email to php-smarty-general+get-202@lists.php.net to get a copy of this message | ||
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... *