raintpl3
raintpl3 copied to clipboard
loop bug - Using {$key} on sub template in loop
Parent Template
{loop="$array" as $stats} // temp solution: as $newKey => $stats
{include="stat"}
{/loop}
Stat Template
{$key} {$stats->hp} {$stats->mp} {$stats->power}
{$key} will print nothing.
Definitely it's a bug, it may be hard to fix.
So I believe also {$counter} and {$value} are not passed inside the included template, right? If we've to pass all the special loop variable inside the loop!