I'm sure there is a really sane and sensible answer to this:
in the bullet menu tpl file there is the following:
{if $node->depth > $node->prevdepth}
{repeat string="" times=$node->depth-$node->prevdepth}
now what I want to do (using the explode menu at http://webtechsig.org/Presentations/css/menus/) is:
{if $node->depth > $node->prevdepth}
{repeat string="id')\">$node->menutext" times=$node->depth-$node->prevdepth}
Now that's not going to work because all that is being defined is a string (prior to run-time) so naturally the repeated string will take the value:
id')\">Object->menutext
This isn't entirely useful. I'd like it to be spitting out something like
SHOUTING IS GOOD - eg. the evaluation of $node->id and $node->menutext rather than the fact that they are, indeed, objects... which is useful to know, just not in this context...
Is there a (sane and not coding on crack) way of doing this or am I barking up the wrong dog?
template smarty repeat tpl help
-
- Forum Members
- Posts: 96
- Joined: Sat Dec 04, 2004 10:30 pm
Re: [solved] template smarty repeat tpl help
Whilst looking for a solution for the same problem I found this post. In the end I used an assign to get the right value before the {repeat}... Hope someone find this of use.
{assign var='ul' value=$node->id}
{repeat string="" times=$node->depth-$node->prevdepth}
...
Cheers
George
{assign var='ul' value=$node->id}
{repeat string="" times=$node->depth-$node->prevdepth}
...
Cheers
George