Skip to content
This repository has been archived by the owner on Jun 25, 2020. It is now read-only.

page.url contains broken in latest master version #228

Closed
markvantilburg opened this issue Mar 23, 2015 · 9 comments
Closed

page.url contains broken in latest master version #228

markvantilburg opened this issue Mar 23, 2015 · 9 comments
Labels

Comments

@markvantilburg
Copy link
Contributor

This snippet does not work with the current version.
{% if page.url contains 'Oplossingen' %} active{% endif %}
The previous release build would put "active" when the file is this "Oplossingen-KlantMonitor.html" for example

@laedit laedit added the Bug label Mar 23, 2015
@laedit
Copy link
Member

laedit commented Mar 23, 2015

Thanks for the issue.
Just to be clear, with the current version the url have the same value and it's the use of contains in liquid which have some issue?
It can come from the last version of dotliquid, I will look.

@markvantilburg
Copy link
Contributor Author

The url is the same as before just the contains does not seem to be working.

@markvantilburg
Copy link
Contributor Author

Maybe it's my own build, i'll check the latest TC build

@laedit
Copy link
Member

laedit commented Mar 23, 2015

Team City is not good right now, try with the AppVeyor build instead.

@markvantilburg
Copy link
Contributor Author

Checked with the AppVeyor build, page.Url is correct just the contains does not work

@laedit
Copy link
Member

laedit commented Mar 23, 2015

The version of dotliquid used have not this issue, so pretzel must mess with the liquid.
The file having the problem is a layout or a content template?

@markvantilburg
Copy link
Contributor Author

_layouts/default.html
which contains:
{% include header-menu.html %}

And in the _includes/header-menu.html this code is used:
{% if page.url contains 'Oplossingen' %} active{% endif %}

This to mark the current page link as 'active'

@laedit laedit closed this as completed in 78f93fd Mar 23, 2015
@laedit
Copy link
Member

laedit commented Mar 23, 2015

page.url was no longer provided to the liquid engine so the if becomes if '' contains 'Oplossingen'.
It is now fixed, can you retry with the last version?
Thanks 😃

@markvantilburg
Copy link
Contributor Author

I tried with the new appveyor build: Pretzel.0.2.1.121 and it's working good again +1

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

No branches or pull requests

2 participants