-
-
Notifications
You must be signed in to change notification settings - Fork 237
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
(How) Is it possible to get all available liquid variables from a template? #80
Comments
As far as I know, there's no such feature in the Liquid template language. See Shopify/liquid#685 But it's possible to achieve this by registering a custom tag/filter |
@harttle With this now being supported in Liquid (see this comment), is there any way to make it work with LiquidJS? |
Not now. We don't have a parsetreevisitor yet. But I'm open for this
feature.
|
I am also looking for this feature, my use case is that I have to fetch an object as a variable, being able to know which variables are being referenced on that object would help greatly with only fetching what is necessary :) |
nvm, just found out about this discussion: #528 |
@FrankHeijden I believe you came across a DelimitedToken which is a subclass of I created a PR for astexplorer fkling/astexplorer#680 , hopefully one day it'll be available on https://astexplorer.net/ website. |
I'm stuck on this issue as well. Is it possible or not? |
I have a scenario where I have multiple liquid themes which can be interchanged. Instead of a dynamic database I use a CSV file, so I have to know all the variables upfront.
Let me explain this with a simplified example:
For these three Themes:
Theme 1:
title
text
image
Theme 2:
title
text
image
Theme 3:
image
subtitle
I would like to get the output of: title, text, image, subtitle
Is there a builtin routine I have missed? What would be the best way for accomplishing this?
The text was updated successfully, but these errors were encountered: