Code52 / pretzel

A site generation tool (and then some) for .NET platforms
http://code52.org/pretzel/
Microsoft Public License
595 stars 163 forks source link

page.url contains broken in latest master version #228

Closed markvantilburg closed 9 years ago

markvantilburg commented 9 years ago

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 commented 9 years ago

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 commented 9 years ago

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

markvantilburg commented 9 years ago

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

laedit commented 9 years ago

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

markvantilburg commented 9 years ago

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

laedit commented 9 years ago

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 commented 9 years ago

_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 commented 9 years ago

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 :smiley:

markvantilburg commented 9 years ago

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