That's an array you can loop over accessing the elements it contains. This RFC adds the following capability:
Code: Select all
<!-- BEGIN somerow -->
<ul>
<li>{somerow.VAR1[element1]}</li>
<li>{somerow.VAR1[element2]}</li>
</ul>
<!-- END somerow -->
Code: Select all
// Loop twice
for ($i = 0; $i < 2; $i++)
{
$template->assign_block_vars('somerow', array(
'VAR1' => array(
'element1' => 'Hey, this is block ' . ($i + 1),
'element2' => 'How you doing?'
)
));
}
Awful example but you get the idea. As per the OP the original intent was to allow quick access to large data sets in vars like $user->data, e.g.
Code: Select all
<p>Hello {USER_DATA[username]} this is your avatar {USER_DATA[avatar_img]}</p>
Again awful example but that's the idea. You can't iterate over {USER_DATA}, you need to specify the element you wish to access.