You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This task is very close to #366. But the previous solution does not fit the idea.
Let me explain in details.
I have one array and it's available in Smarty: $arr = array('first' => 'One', 'second' => 'Two');
I want to extend this array with more items using capture:
{capture name='third' append='arr'}
Three
{/capture}
{capture name='fourth' append='arr'}
Four
{/capture}
As a result I would like to have array like this: $arr = array('first' => 'One', 'second' => 'Two', 'third' => 'Three', 'fourth' => 'Four');
At the moment, capture does not allow to do this, as it does not pass any keys to the array during append. I know I can use $smarty.capture.third, etc. anyhow it's not the option for me right now.
Let me know if we can hack somehow the system, to get the results we expect.
Thanks
The text was updated successfully, but these errors were encountered:
Hello,
This task is very close to #366. But the previous solution does not fit the idea.
Let me explain in details.
I have one array and it's available in Smarty:
$arr = array('first' => 'One', 'second' => 'Two');
I want to extend this array with more items using capture:
As a result I would like to have array like this:
$arr = array('first' => 'One', 'second' => 'Two', 'third' => 'Three', 'fourth' => 'Four');
At the moment, capture does not allow to do this, as it does not pass any keys to the array during append. I know I can use $smarty.capture.third, etc. anyhow it's not the option for me right now.
Let me know if we can hack somehow the system, to get the results we expect.
Thanks
The text was updated successfully, but these errors were encountered: