Hello,
when creating a navigation module, there is an option to change the template (nav_default).
Can someone tell me what is the right way to create a new template so that it appears there on the list?
Thanks!
Hello,
when creating a navigation module, there is an option to change the template (nav_default).
Can someone tell me what is the right way to create a new template so that it appears there on the list?
Thanks!
Yes, copy the file nav_default and put the copy in the folder root/templates
You can change the file name to anything you wish just prepend with nav_ for example nav_custom
It should now appear in the dropdown list :-)
An equivalent, but alternate method is to use the Templates manager from the left column of the backend. Once you've created a template from the existing one, just rename it to nav_anything. You'll need to make sure the Templates extension is enabled in Settings if you don't find it in the left column.
Thank you for the quick responses but I already did that without success, that's why I thought that there is perhaps a trick to it. I'm using Contao 2.9.1 with two different themes, each one pointing to a different template-folder inside /templates, like this:
I copied the templates using Contaos built-in function. However, only nav_default show up in the templates list when editing the navigation module for the second theme.
The template won't be available to the navigation module if you name the file "subnav_default".
Originally Posted by DoublesparkOriginally Posted by Ben
Ben did say use nav_anything
you have used subnav_anything
Try changing the filename to nav_sub.tpl
This will tell the system that the file it's a navigation template and therefore should be included in the dropdown. I THINK :D
Sorry - Ben beat me to it
Originally Posted by Doublespark
I love you guys.
Glad you got it sorted out, Alewar!
Bookmarks