caffeinated / menus

:pushpin: Menu generator package for the Laravel framework
https://caffeinatedpackages.com
132 stars 59 forks source link

New Feature: Active Link support #8

Closed SergeyMiracle closed 9 years ago

SergeyMiracle commented 9 years ago

Would be nice to parse menu with active element (current link).

Didn't find it in wiki or code.

kaidesu commented 9 years ago

It's on my list of things to do for the package :+1:

SergeyMiracle commented 9 years ago

Nice :+1:

pyansopyan commented 9 years ago

so, how to check the link is active?

kaidesu commented 9 years ago

The package will now automatically detect the currently active link, and add a new active class to the item. Just be sure to echo out your item's attributes from within your view file, and use CSS to make any style changes as needed.

See the documentation on active links and rendering attributes for more information. I'll be closing this now, but if you guys run into any issues or have any questions, don't hesitate to speak up!

SergeyMiracle commented 9 years ago

Great job :+1:

asaf050 commented 9 years ago

Hey, I need to add class to the parent UL if the link is active. How can I check if item is active in the items loop? Thanks!