Reputation: 5598
I'm new to Timber/Twig, but so far I'm loving it!
I would like to have a folder with partials/components or "blocks" as Timber/Twig calls them, so I could have say a "video.twig" component, that can be reused through out the page.
1) How can I "register" the components/block in a folder?
2) How can I "feed" the component/block with data? I would like to do something like this:
{% block component DATA %}
Upvotes: 0
Views: 341
Reputation: 6689
The syntax in include
looks like this:
{% include "comment.twig" with {comment:cmt} %}
It may work for the block too. Give it a shot.
Upvotes: 1