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

interpolation in include statements #38

@pixelrabbit

Description

@pixelrabbit

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions