-
-
Notifications
You must be signed in to change notification settings - Fork 238
This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
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
can you make a tag named paginate like shopiffy? #387
Comments
We do have a layout tag to make LiquidJS functionable out of the box. But other Shopify tags/filters will only be added into liquidjs if they're not Shopify business specific. Otherwise creating a plugin to maintain a given set of filgers/tags is recommended. Feel free to open an issue for liquid support while doing so, or ask a question in LiquidJS Discussion. |
the question is how to get these variable like this in a plugin ? |
In ruby liquid, I was able to create the paginate block by inheriting from Liquid::Block. For liquidjs, I am trying to figure out how to accomplish the same thing and it looks like the necessary components are hidden away and not exported. |
@wuyonggang100 names in import {TagToken} from 'liquidjs' |
@ericraio not sure what
|
What I am looking to accomplish is creating my own for loop tag where in
shopify you can use the syntax like
{% paginate collection.products by 20 %}
{% endpaginate %}
In ruby, I accomplished this syntax from inheriting from Liquid::Block
…On Mon, Oct 4, 2021 at 6:45 AM Jun Yang ***@***.***> wrote:
@ericraio <https://github.com/ericraio> not sure what Block does.
According to this doc <https://rubydoc.info/gems/liquid/Liquid/Block>, I
suppose it's something like Tag or classes used by Tag. We do have
registerTags <https://liquidjs.com/tutorials/register-filters-tags.html>
and Drop, the latter one is not well documented but I believe it's usable.
- registerTags:
https://liquidjs.com/tutorials/register-filters-tags.html
- Drop: not well documented, but
- A sample usage can be found here:
https://github.com/harttle/liquidjs/pull/398/files
- Types doc can be found here:
https://liquidjs.com/api/classes/drop_drop_.drop.html
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#387 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAAKW6G36IN4ARMRJEOZFWTUFGVXVANCNFSM5D43SL3Q>
.
--
- Eric Raio
|
Seems like just Tag, implement something like if and register using |
@harttle can tags perform iterations ? that's what shopify's block is doing |
This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
https://shopify.dev/api/liquid/objects/paginate
https://shopify.dev/api/liquid/tags/theme-tags#layout
The text was updated successfully, but these errors were encountered: