Hi All,
Say I have:
$this->renderElement('element', array('arg1' => 'val1', 'arg2' => 'val2'));
Once inside element.thtml, how could I render another element and pass
whatever arguments were passed onto the main element? (ie. arg1, arg2 in
this case)
I thought of a (untested) workaround, but, it's not very nice. I thought I
could do something like:
$this->renderElement('element', array('args' => array( 'arg1' => 'val1',
'arg2' => 'val2')));
foreach($args as $key => $val)
{
${$key} = $val;
}
Inside element.thtml:
$this->renderElement('element2', array($args));
... but it's too hack-ish. Any other suggestions?
Thanks in advance.
Regards,
Gonzalo
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake
PHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---