where_exp comparing with assigned variables #790
Replies: 3 comments 1 reply
|
The So I'd say this is a feature request or compatibility bug. |
1 reply
|
Seems to be a valid use case, and I'm adding support for context-awareness. As this feature is introduced from jekyll and not related to shopify, we definitely should try to make it compatible with Jekyll. |
0 replies
|
Added support by #793 and released as 10.20.2. Please let me know if it still doesn't work. |
0 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.
I'm using liquidjs in 11ty.js and trying to put a section where I show 3 random card elements of the other posts in the current collection at the bottom. It mostly works except, I need to filter our the current post and the way I'm attempting to do it doesn't seem to work. I've been unable to find any documentation on this.
collection[tags]is giving me all the posts in the current collections properly and usingsample: 3is grabbing 3 random ones. However, when trying to filter out the current post It's not working at all. I'm trying to usewhere_expbut the comparison isn't working, so I think I just have the syntax wrong for accessing a variable in the comparison.If I hardcode it to test
"item.fileSlug != 'current-pages-slug-here'"it successfully filters it out the matching fileSlug.Is there a way to use an assigned variable in a
where_exp?All reactions