Skip to content
This repository has been archived by the owner on Mar 14, 2024. It is now read-only.

interpolation in include statements #38

Open
pixelrabbit opened this issue Sep 29, 2022 · 0 comments
Open

interpolation in include statements #38

pixelrabbit opened this issue Sep 29, 2022 · 0 comments

Comments

@pixelrabbit
Copy link

twing-loader does not seem to support interpolation when used in an include statement

This works
{% include "./test.twig" %}

This does not work
{% set filename = "test" %} {% include "/#{filename}.twig" %}

Regular interpolation in a paragraph string does work however so I believe it's related to order of operations. This is the error I receive in storybook.

TwingErrorLoader: Template "/test.twig" is not defined in "C:/Users/dango/Development/twigbook/components/Example/Example.twig" at line 7.

Any help you can provide is appreciated.

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

No branches or pull requests

1 participant