Replies: 1 comment 2 replies
-
You can alias the results of the first {{ taxonomy:products }} tag into a variable (like
|
Beta Was this translation helpful? Give feedback.
2 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.
-
In the below block of code I loop through {{ taxonomy:products }} 3 times which gets a bit messy to look at. Obviously I can't simply put opening and closing taxonomy:products tags on the outside of the code block and remove all the inner ones as it screws up the structure. So I'm wondering if there is a cleaner way to approach something like this..
I was trying things with the as modifier but it didn't seem to do what I wanted, anyway just wondering if I can optimize this type of situation.
(The actual code I'm working on uses alpine which I removed below for clarity, so right now it doesn't necessarily make much sense but you get the gist)
Beta Was this translation helpful? Give feedback.
All reactions