-
-
Notifications
You must be signed in to change notification settings - Fork 178
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
Problem accessing properties in class extending IEnumerable #694
Comments
That is a possibility if this property is converted to an ArrayValue. In that case it will only try to access internal properties ( In this case you would probably need a mix of Also, why do you need to use |
Mmmm.. I don't know how the properties are converted... I'm passing an object with the property Regarding your second question: My bad. I copied the code I used in the meanwhile, that iterates over |
Which is normal. This is what Fluid uses internally. I was just suggesting you create a similar class by inheriting |
Ahhh, perfect. Yes, as I said, I already fixed that by iterating over the |
Just in case you don't know, there is a filter for that: https://shopify.github.io/liquid/filters/where/ |
Even though there is a mitigation I am keeping this issue open as I might want to revisit the distinction between |
I have the following code:
And now, passing an instance of Permit to a template like
{% for vehicle in Permit.Vehicles.Approved %} {{ vehicle.Value.Plate }} {% endfor %}
renders nothing. It seems that fluid detects thatVehicles
is an IEnumerable and stop trying to get the next property. Of course iterating over Vehicles works, but that makes me replicate the same code I have inApproved
into the template.Not sure if this is by design, or a problem in the template system.
The text was updated successfully, but these errors were encountered: