I am trying to alter my title to include html. I have tried the following
function MODULENAME_views_pre_render(DrupalviewsViewExecutable $view) { if($view->id() == 'products_test'){ foreach($view->result as $value){ $value->_object->set('title', 'test - ' . <b>My new Title</b>; } } }
This outputs the title as test - <b>My new Title</b>
Rather than rendering html in the tag.
I tried wrapping in decode_entities, but nothing happeded.
I am using view mode full content rather that as fields if this makes any difference.
Thanks for any help