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

Evaluate attribute is broken with loop #171

Open
sebastienbeau opened this issue Jan 27, 2020 · 2 comments
Open

Evaluate attribute is broken with loop #171

sebastienbeau opened this issue Jan 27, 2020 · 2 comments
Assignees
Labels

Comments

@sebastienbeau
Copy link
Contributor

If you try do do something like this

{% for lang in langs %}
{% path_to about_us, locale: lang %}
{% endfor %}

with 'langs' => ['en', 'fr']
It will always evaluate lang='en' and never 'fr'.

The issue is here : https://github.com/locomotivecms/steam/blob/master/lib/locomotive/steam/liquid/tags/concerns/attributes.rb#L32

The first time it will evaluate the attribute to 'en' and update them, so the next iteration it's not anymore a liquid variable, it's just "en" so it will never evaluate to "fr".

Work in progess here : #170

@sebastienbeau
Copy link
Contributor Author

@did

@did
Copy link
Member

did commented Jan 30, 2020

fixed by 89b7e02 while we're merging @sebastienbeau's PR about the new parsing attributes mechanism.

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

2 participants