I would like to do {unset($array['index'])}
into a Smarty 3 template.
Is such a syntax (or similar) supported ? After Googling and doc reading I can't find something satisfying.
Maybe I should ask for a feature request to Smarty dev team ? :)
Anyway, how would you do this given the currently available template functions ?
I don't think there's a direct support for this in smarty. You can always do this with smarty's {php}
tag, however I would strongly discourage you from doing so. Logic doesn't belong in a presentation-level template.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With