Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

__home__, /, and active class #4

Open
pixeljitsu opened this issue Mar 4, 2015 · 4 comments
Open

__home__, /, and active class #4

pixeljitsu opened this issue Mar 4, 2015 · 4 comments
Milestone

Comments

@pixeljitsu
Copy link

If I create a menu linked to the homepage single
the generated URL is:

example.com/__home__

and the menu is highlighted as active, then if visiting

example.com/ 

the menu is no longer active
and I have the same content in both URLs

If instead I create a custom URL using just /
then the menu is always active because it sees all pages a children.

Is there a way around this?

What I would like to be able to do is just link to the homepage single and omit the

 __home__ 

from the generated URL.

Thanks.

@herrfarsi
Copy link

I would also like to see a solution to this problem!

@CountKyle
Copy link

This is something I have been having issue with too.

@fyrebase
Copy link

Simple work around for now is to add something like this above your menu template.

{% set homeIsCurrent = (entry.section.handle == 'homepage') %} <li role="presentation" class="{% if homeIsCurrent %}active{% endif %}"> <a href="{{ siteUrl }}">Home</a> </li>

@keithmancuso
Copy link
Owner

Hey everyone sorry for the radio silence, hoping to address this in the update im planning this week

@keithmancuso keithmancuso modified the milestone: 1.0 Feb 17, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants