Nested tag loops with partials behave unexpected #6867
Unanswered
hanneshoepfnerio
asked this question in
Troubleshooting
Replies: 1 comment 3 replies
-
This is definitely interesting! I will look into this. Thanks for the excellent write up! |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hello,
I've had a discussion in Discord but I'm assuming that there might be some issues, but I'm also very happy to prove me wrong ;)
So this code on a entry detail page:
This is outputting the following, if the partial v1 is used with commented out antlers
What is unexpected is that after the iteration over the pages collection the {{title}} var of the entry is altered – in this case to page5 which is not even the last of the iteration.
When using partial v2, without any antlers the var stays the same, as expected.
Also when i comment out the outer loop.
I found a workaround which prevents this behavior using aliasing
But it is a little strange to me.
Please help me understand, or check what is going on there.
Thank you!
Beta Was this translation helpful? Give feedback.
All reactions