In view I have widget:
if ($content):
echo Alert::widget([
'options' => [
'class' => 'alert-info',
],
'body' => $content,
]);
endif;
That widget I want render not always, for example after save and atc. Now Now I have placed that widget between if condition, maybe exists some more clear way to render widget only in some cases.