-
-
Notifications
You must be signed in to change notification settings - Fork 169
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
Collections not shown in Twig #1452
Comments
hey @milosa the PR I mentioned above should resolve the |
@I-Valchev The length is now correct. The for loop still doesn't print anything though. |
I'm not sure if you're aware, but for me, the |
@bobdenotter #1455 only fixes the |
Re-opened. |
I'm having the same problem with It works fine when retrieving the first image in a template e.g. However, when I try to loop through the |
I've updated the docs for this: bolt/docs#1048 PR with code changes to follow shortly. |
@benplummer Latest commit to #1485 also fixes it for Imagelists. |
@bobdenotter Thanks! |
Collections are not printed in the Twig templates.
When trying this example, the loop doesn't print anything.
Also, I noticed that when I print
features|length
in twig, I get some weird numbers.I added 1 feature in the back end, so I’d expect it to print 1. But instead I got 4.
When I add another one, it should be 2, or maybe 8, but I got 11.
Even though
features
has elements (because it's length > 0), the stuff inside the loop doesn’t get executed.Maybe it's related to #1438 or the fact that
htmllang()
is still empty and therefore the system doesn't know which translation to use (#1437)Details
Reproduction
Create new Bolt project. Add field to a contenttype from this example and use the for loop from that page as well.
Steps to reproduce
Add some data to the features field.
Expected result
Features are shown on the page with the for loop from the docs.
Actual result
Features are not shown.
The text was updated successfully, but these errors were encountered: