Section tag: Feature Request
Hi Not an issue more of a feature request, would be good to add the base tag {% section "fName" %}
Looking at the include tag code, it looks like it would pretty much mirror that. I may spool up and test a pr duplicating the include tag implementation :)
Is section an official tag? Can you make a reference to the liquid documentation?
Hiya, not an official as far as liquid goes. However an official tag on shopify liquid rendering so thought in context to :
A shopify compatible Liquid template engine in pure JavaScript.
as in if some one wanted to render some existing Shopify code via node It would hit a number of missing Shopify specific tags.
- section ( include with specific capabilities )
Ones that wouldn't make sense to add as individuals may wish to write logic around these:
- schema / endschema
- form / endform
- paginate / endpaginate ...
I am not sure on the scope you are trying to work to, but if it is to render shopify templates via node ( my use case ), there will be these implementations that do not exist in the liquid docs.
At present I am just gonna build them into a plugin for usage in my use case. :)
That's great to have this plugin, I would like to put it into the plugin list when you're ready.
Any update on this issue?
I tried to make a section-tags plugin but I just find out that I'm totally not familiar with shopify sections. Anyway it could be a start point, sharing my code here: https://github.com/harttle/liquidjs-section-tags .
Since this repo only support standard filters and tags given by shopify/liquid, this thread should be closed.
@harttle what's the latest on this?
The above mentioned repo is discontinued. But I think we should keep this issue open as people are still interested.
Let’s wait for the implementation here.
@harttle anything I can do? If you have time to get me up to speed I can dig in and get it working.
I've transfered harttle/liquidjs-section-tags to you. Hope that can still run with latest LiquidJS, otherwise please check the migration guide.
These links are also useful:
- https://liquidjs.com/tutorials/plugins.html
- https://liquidjs.com/tutorials/register-filters-tags.html
Feel free to ask any further questions on discussions page, as dev questions are also valid there, many people trying to implement their own tags/filters, others can also help you.
My problem is not familiar with how section works. Please ask for help when get stuck on LiquidJS problems, I can create PRs to fix them.
Again, closing as there's no section/theme concept in LiquidJS as a general-purpose template engine. Feel free to contact me if someone have a decent implemention that I can link to in LiquidJS docs.