I use PHP Smarty and now I want to use replace: on a more correct way.
I want to remove the entire <div class="news-text"></div> and its inner content.
How can I achieve that?
My code currently looks like this, but it is nasty because it only hide the content:
{$announcement.text|replace:'<div class="news-text"> ':'<div style="display:none;" class="news-text">'}
{$announcement.text|replace:'<div class="news-text"> ':''}? That said, this should probably be handled outside the view, and handled via a proper DOM manipulation.<div class="news-text">still is displayed/loaded. And I need a way to remove the entire<div class="news-text">with the inner content.