Skip to content
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 to use inside a twig file? #21

Open
landwire opened this issue Apr 13, 2018 · 1 comment
Open

How to use inside a twig file? #21

landwire opened this issue Apr 13, 2018 · 1 comment

Comments

@landwire
Copy link

landwire commented Apr 13, 2018

Hi there,
Could you add an example of how to use this inside a twig file and how the syntax is to pass the variables to the file?

At the moment I do this inside the twig file to include other twig files:

{% include '@prototype/partials/layout/l-landing-page.html.twig' with { 'variable' : value } %}

But would like to do include also some hbs files like this:

{% handlebars '@prototype/partials/layout/l-landing-page.hbs' with { 'variable' : value } %}

Thanks,
Sascha

@mfeltscher
Copy link
Member

Hi @landwire

Sure thing. After registering your templates as described here you should be able to use them in your Twig files as follows:

{% handlebars('l-landing-page.hbs', { 'variable' : value }) %}

Can you give it a try?

Moreno

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants