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

Nav tag on multi language URLs will not display if starting from a subfolder ie: {{ nav from="{ segment_1 }" }} #682

Closed
mc72 opened this Issue May 12, 2016 · 13 comments

Comments

Projects
None yet
7 participants
@mc72

mc72 commented May 12, 2016

Steps to reproduce

  1. Using nav tag {{ nav from="{ segment_1 }" max_depth="3" }} on multi language site.

Expected behaviour

Should see the menu based on the subfolder.

Actual behaviour

No output.

Nav does not display if the locale is in the URL (ie: http://domain.ltd/fr/frenchslug) and starting from a subfolder. The segment variable doesn't appear to have an effect on a nav tag on a multi language site.

The proper multi language display will appear if you haven't converted the url to a multi language version (ie: http://domain.ltd/fr/english/folder/names)

{{ nav from="/" }} does display the correct nav/sub nav.

PHP version:
7.0

Statamic version:
2.04 (but same effect on all v 2.x sites)

Updated from an older Statamic or fresh install:
Updated from an older statamic

@andypillip

This comment has been minimized.

andypillip commented Jun 15, 2016

Can confirm this issue.

Additionally is_current and is_parent don't work properly.

Actually this should not only be related to locales, but to any subfolder. Because adding those locale-folders with single index.php files and adding ../ to the path is nothing different.

@edalzell

This comment has been minimized.

edalzell commented Mar 9, 2017

@mc72 is this still an issue?

@Rommert

This comment has been minimized.

Rommert commented Mar 21, 2017

@edalzell. This is still an issue. Can confirm this. Clean install: version 2.5.7.

Can this be fixed? This is essential for multi language websites.

@andypillip

This comment has been minimized.

andypillip commented Apr 10, 2017

To me it seems this is fixed…

I just did an update to 2.5.9.

@jasonvarga jasonvarga closed this May 9, 2017

@beeldr

This comment has been minimized.

beeldr commented Jul 25, 2017

To me this does not seems fixed, I use the next few lines for a subnav.

It works fine in the main language (dutch) but when the page switches to english the segments change to english and it stops working. When manually setting the segments to the dutch segments (from="/leveranciers/famosa") it works fine in dutch and english.

{{ nav from="/{segment_1}/{segment_2}" }} <li class="subnav__item{{ if is_current || is_parent }} subnav__item--active{{ /if }}"> <a href="{{ url }}">{{ title }}</a> </li> {{ /nav }}

I'm currently running 2.6.1

@andypillip

This comment has been minimized.

andypillip commented Jul 25, 2017

@beeldr I can confirm. It seems to be a regression issue?

I'm quite sure it was fixed in between. Can somebody test with 2.5?

@beeldr

This comment has been minimized.

beeldr commented Jul 27, 2017

@jasonvarga Could someone please look into this? I can't publish the site without this being fixed.

@andypillip

This comment has been minimized.

andypillip commented Jul 27, 2017

@beeldr did you try rolling back to 2.5 as a quick fix?

@beeldr

This comment has been minimized.

beeldr commented Jul 27, 2017

@andypillip Jup 2.5.11 , no luck :(

@beeldr

This comment has been minimized.

beeldr commented Jul 27, 2017

@andypillip i don't have a 2.5.0 install file anywhere and can't find it at the statamic website. I'd try it if I could get my hands on it.

@andypillip

This comment has been minimized.

andypillip commented Jul 27, 2017

@beeldr I have all my updates version controlled, I'll try when I get to it.

@beeldr

This comment has been minimized.

beeldr commented Jul 28, 2017

@andypillip great thanks, for now i've replaced /{segment_1}/ with /leveranciers/ because only segment 2 is variable as the submenu is only active at those pages at this time so i can publish it.

@subpixelch

This comment has been minimized.

subpixelch commented Sep 18, 2017

Please @jasonvarga reopen... it's again broken in 2.6.8 - please fix urgent 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment