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

Twig Include with interpolated string: "Missing template" #488

Closed
pzfl opened this issue Apr 26, 2015 · 2 comments
Closed

Twig Include with interpolated string: "Missing template" #488

pzfl opened this issue Apr 26, 2015 · 2 comments

Comments

@pzfl
Copy link

pzfl commented Apr 26, 2015

If you include a template by an interpolated string, like

{% include "article/segments/#{segment.typeKey}.html.twig" with {'segment': segment} %}

the warning "Missing template" appears.

I would either not check, if the template exists for a string with an interpolated value or check, if the path exists till the first appeareance of a variable.

@King2500
Copy link
Contributor

King2500 commented May 3, 2015

👍

@King2500
Copy link
Contributor

Same applies with concatenated path string:

{% include "article/segments/"~segment.typeKey~".html.twig" with {'content': segment.content} %}

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

3 participants