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
sourcecan be ambiguous e.g. if you useinclude-tag. Nonetheless you can define thesourceas template name passed torender-function. So straightforward way is to overriderender-method ofnunjucks-environment.P.S. Be careful, this code may have side effects.