OK, i didn't see one of the last line : {set last=$menu}
At the first iteration, last is an integer, and for the next iterations, it becomes an array . That's why there's a test on the value and the level attribute.
Hmmm ...
I think that in first interation $lastlevel is empty and $last is zero so i don't understand how can be done $lastlevel|ne(0) when there is no value for $lastlevel. i think it is some bug ...
and one more thing ...
after first ineration $last becomes an array, so how it is possible to compare $last | ne(0)
(if an array not equal to zero). So if there is someone who already have those answers, please tell us.
You must be logged in to post messages in this topic!