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

Absolute URL setting doesn't work if an alias is used #4

Closed
BenParizek opened this issue Sep 7, 2018 · 6 comments
Closed

Absolute URL setting doesn't work if an alias is used #4

BenParizek opened this issue Sep 7, 2018 · 6 comments
Assignees
Labels

Comments

@BenParizek
Copy link
Member

BenParizek commented Sep 7, 2018

This works fine if Base URL is set to https://website.com/ but fails if Base URL is set to @web/

{{ active('https://website.com/news/article', 'url') }}

Front logo Front conversations

@pdaleramirez
Copy link
Contributor

Committed a fix for this 59f4abf

@BenParizek
Copy link
Member Author

@pdaleramirez We're going to need to handle the @web Yii alias dynamically. Users can define and use custom values like @baseurl or @whatever too.

@jsunsawyer
Copy link

I'm trying to get this to work with a nav built using linkIt fields in a matrix field. Because of this, I need to use absolute URLs.

I attempted to use path as an alternate solution, but just get an Unknown Property error.

Here's what I'm attempting to add {{ active(navLink.url|replace(siteUrl, ''), 'path', 'is-active') }}

@BenParizek
Copy link
Member Author

@jsunsawyer Looks like we had another bug when testing for path. I've pushed a fix in v2.0.8 which is now available in the plugin store.

@pdaleramirez
Copy link
Contributor

Added support for alias based string for url active here 0696d8e

@BenParizek
Copy link
Member Author

This is resolved in release v2.0.9, now in the plugin store.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants