How will I change the active class in twitter bootstrap when i visit another page with Laravel Blade Templating ?
Question posted in Twitter Bootstrap
How will I change the active class in twitter bootstrap when i visit another page with Laravel Blade Templating ?
2
Answers
here is an example this might can help
You could define a variable in your blade template
And then in the layouts file;
So, if the page includes a variable called nav_profile then insert ‘active’ into the class. The ‘or ‘part inserts an empty string if the variable is not present.
I have found a simple solution for this problem. This solution has very simple trick.
And it will work for all links throughout the page.
Adding this code to the end of your page will do the magic.