This forum has moved to a new location and is in read-only mode. Please visit talk.octobercms.com to access the new location.

dash.me
dash.me

Hello, i was trying to implement Static Pages Menu on my new website. So menu just works fine. Everything is there like i can see. Problem is that when i use this to add class when item is active

< li class="nav-item {{ item.isActive or item.isChildActive ? 'active' : '' }} {{ item.items ? 'dropdown' : '' }}" >

nothing is happening. I was trying to copy the same think from other themes, but i can see that all of them doesn't show active class anymore. I'm trying evertyhing last 4 hours and 0 success.

Last updated

dash.me
dash.me

I found how to fix this and it's very sad that this still is not fixed in official plugin repo. After more then a year you guys now for this bug :S

https://github.com/rainlab/pages-plugin/issues/126

Hi LaravelNick.

To fix this you need to open the file plugins/rainlab/pages/classes/Menu.php and edit the following lines;

Change following line 130 $currentUrl = Request::path(); To 130 $currentUrl = Str::lower(Request::path());

Remove following line 136 $currentUrl = Str::lower(URL::to($currentUrl));

Change following line 159 $apiResult = Event::fire('pages.menuitem.resolveItem', [$item->type, $item, $currentUrl, $this->theme]); To 159 $apiResult = Event::fire('pages.menuitem.resolveItem', [$item->type, $item, URL::to($currentUrl), $this->theme]);

Good luck ;)

1-2 of 2

You cannot edit posts or make replies: the forum has moved to talk.octobercms.com.