Was looking over the source of template.php and found this, can someone tell me what it does? I think I have a pretty good idea, but it might be wrong due to my lack of knowledge of $_tpldata array.
- Code: Select all
if (strstr($blockname, '.'))
// Nested block.
$blocks = explode('.', $blockname);
$blockcount = sizeof($blocks) - 1;
$str = &$this->_tpldata;
for ($i = 0; $i < $blockcount; $i++)
$str = &$str[$blocks[$i]];
$str = &$str[sizeof($str) - 1];
// Now we add the block that we're actually assigning to.
// We're adding a new iteration to this block with the given
// variable assignments.
$str[$blocks[$blockcount]] = $vararray;