A
A
agent11562017-01-28 13:04:41
Yii
agent1156, 2017-01-28 13:04:41

How to add active class to menu element in yii2 when clicking on section?

How to add active class to menu element in yii2 when clicking on a section?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
victor-nerd, 2017-01-28
@victor-nerd

if you focus on a specific uri, then for example like this
if entirely on the controller then so

$this->context instanceof \admin\controllers\DeviceController ? ' active' : ''

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question