is there some possibility to pass current folder name in to the nunjuck template?
Something like:
This folder name is {{currentFolderName}}
Output:
This folder name is navigation
from path for exmpl: blahblah/components/navigation
Thanks :)
is there some possibility to pass current folder name in to the nunjuck template?
Something like:
This folder name is {{currentFolderName}}
Output:
This folder name is navigation
from path for exmpl: blahblah/components/navigation
Thanks :)
The
source
can be ambiguous e.g. if you useinclude
-tag. Nonetheless you can define thesource
as template name passed torender
-function. So straightforward way is to overriderender
-method ofnunjucks
-environment.P.S. Be careful, this code may have side effects.