Answer the question
In order to leave comments, you need to log in
How to resolve syntax error, unexpected 'if' (T_IF) error?
Hello everybody! Please tell me, when using Menu::widget in one of the menu items, it is required to display the counter by condition, I wrote as follows:
[
'label' => 'Интернет-приемная',
'icon' => 'envelope-o',
'url' => ['/mailbox'],
'template'=>'<a href="{url}">{icon} {label}<span class="pull-right-container"><small class="label pull-right bg-yellow">' . if($count){echo $count}; . '</small></span></a>',
],
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question