am-impact / amnav

Navigation plugin for Craft
168 stars 19 forks source link

active class not being applied to custom url #46

Closed marc524 closed 9 years ago

marc524 commented 9 years ago

I have 2 sub menu items. One is an Existing Entry. The other is a My Own URL.

My page template has in the sidebar the sub menu items. So the code in the sidebar template looks like:

{{ craft.amNav.getNav("mainNavigation", { class: 'sub_nav', startFromId: 2 }) }}

I believe the issue is how the plugin is reading the URL.

If I put in as the custom URL: /about/staff - then it does NOT work (active class is not assigned). If I put in as the custom URL: about/staff - then it DOES work (active class IS assigned)

The problem is, if I leave off that first forward slash in the URL, then the links get screwed up. If I'm already on http://craft.dev/about/staff and click the link when it is set as about/staff, then I'm brought to a 404 page as it tries to find: http://craft.dev/about/about/staff

marc524 commented 9 years ago

I also tried putting in the full URL as the custom: http://craft.dev/about/staff and that did NOT work either.

hubertprein commented 9 years ago

I'm guessing you don't have the latest release. Could you check this for me please?

marc524 commented 9 years ago

ah. Yes this is fixed in 1.6.9. I was still on 1.6.6. Thanks!