Include Twig file without providing file extension

I am new to design template templates. I am trying to include some twig file in another twig file. I am using the following code to enable it,

{% include 'layout/css.html.twig' %}

      

But for inclusion, I want to include the file without adding the extension to it. Where should this configuration be used to use the above include as shown below?

{% include '/twig/front/layout/css' %}

      

+3
php twig twig-extension


source to share


No one has answered this question yet

Check out similar questions:

55
How to include CSS file in Symfony 2 and Twig?
five
Maintain indentation level for included Twig substring
4
How to wrap HTML without including new files in Twig?
3
Twig: use "Ignore Missing" in default Include
1
How to set up Twig and Timber to translate full branch templates with {% trans%} tags
0
Using locateResource inside Twig extension
0
Including twig files from current directory
0
Twig - parse variables from imported template
-1
Registering a Twig Extension in Symfony
-2
Using twig (standalone) i18n Extension with xliff files



All Articles
Loading...
X
Show
Funny
Dev
Pics