Open mnpenner opened 8 years ago
Not sure if the engine is able to register multiple extensions, otherwise I'm okay with this.
Would like that as well in order to allow inlining JS & CSS resources ({% include '...' %}
)
I am interested in this feature. Being able to use template with names like *.html.twig will make it easy to reuse a lot of templates (from Symfony 2 bundles or libraries that use the same convention).
I had a look at the implementation. By delegating template name normalization it can support mutiple extensions. It will require some changes in the Loader, Bridge and ServiceProvider. See sgueye-multi-twig-extensions
Hi @sgueyemms. Did you end up submitting a pull request for this?
Otherwise I'd gladly "take over" your fork and submit a PR for this 🙂
I don't always use HTML and my underlying template language with Twig. PhpStorm supports
.js.twig
and other extensions.I tried changing the config option,
to
but it doesn't seem to support array notation.
This used to work with Barry's version in Laravel 4.2, but I see that the loader now goes through Laravel's own engine, which I guess doesn't load anything unless it's been registered.