So basically when I visit the specific action/Controller : it should put the class = "active" in the li tag. So when I visit "someController/actionSomthing" like so : TbNavbar and CMenu were able to achieve this automatically, however I am not able to implement it for my views. However, now as I visit any view, it should put the appropriate "active" class in the menu list item. Although this approach of embedding PHP code directly into the view file does. However, in this current project, we have created entirely a different menu with lots of new spans and divs inside, so integrating it with the current TbMenu or Cmenu was proving to be very difficult, so we are putting up the menu HTML as is in the main layout. official Yii extension library Zii is introduced, and we use Zii widgets. > request -> urlReferrer ) > To set the return url to be the url that was before the login page or registeration page was called you can put following code in views/layouts/main.php file : Set which shortcuts collection appears in the larger widgets: Tap Folder, choose a folder, then tap outside of. YII2 nav widget open link in new tab/window and how to link to external link By Zeeshan Ahmad. Do one of the following: Set which shortcut appears in the small widget: Tap Choose, tap a shortcut, then tap outside of the widget. Create a public function for actionChecklinks which we will later call using yii link/checklinks. On the Home Screen of your iOS or iPadOS device, touch and hold the Shortcuts widget. The thing is, till this point I was using CMenu and when working with Bootstrap, I was using TbMenu. Yii to get our settings, the links model to get all of our links from the database, the html helper to generate edit links, and url to create those links back to the application. I am working in Yii and am suddenly stuck in this dilemma.#Yii2 nav widget direct url link how to#