[eluser]Dagobert Renouf[/eluser]
Hello guys,
I have some part of my controller that populates the $data array with an "admin_notification" value only if there is a notification.
To avoid errors in my view, I first set $data['admin_notification'] = "".
Here's my problem: I can't wrap the <?= $admin_notification; ?> in any paragraph or thing like that, because in the case of no notification and depending on my css, this would display an empty box (concidering it is wrapped in a box) and I just don't want any box at all.
So as I don't know if the notification exists in the view, I need to wrap data in my controller before sending it to the view (example : $data['notification'] = '<p>' . $error . '</p>';
I'm forced to put my html in my controller and that sucks !
How do I make it clean ?