default template isn't working as expected when no template is selected in the node?
this maybe a misunderstanding on how this feature works but...
i've created a doctype and set a default template:
if i create a node based on this doctype it works as expected.
however...
if for some crazy reason i decide to change the template drop down to 'choose' in the info tab of the node:
i get a ysod stating:
No physical template file was found for template Index
why isn't it loading the default?! or am i missing something...
i get that a doctype needs a default template and can have multiple templates but i was working on the basis that if none was set, it would fall back to the default?
any clarity on this one would, as ever, be amazin ;)
Default Template in this situation means, when you have 2 or more templates assigned to a Document Type, the Default one is the first Template that will be auto assigned to content node which you create in the content section.
When you set a content node to choose, then the default template is not the one that will be used. It means no view is needed for this content node and therefore doesn't have a "real url" in the front end website.
i wonder if the real solution for this then is that the 'template' select doesn't show in the info tab for nodes based on doctypes without a template or only one template?!
the pain that i currently have is that i've changed the template name in a site and all the nodes that were based on that template have now reverted to 'choose...' in the template select! this means ysods for all those nodes...
the solution appears to be working through the site and selecting the template for each node...
i had it in my head that it'd fall back to the default!
default template isn't working as expected when no template is selected in the node?
this maybe a misunderstanding on how this feature works but...
i've created a doctype and set a default template:
if i create a node based on this doctype it works as expected.
however...
if for some crazy reason i decide to change the template drop down to 'choose' in the info tab of the node:
i get a ysod stating:
why isn't it loading the default?! or am i missing something...
i get that a doctype needs a default template and can have multiple templates but i was working on the basis that if none was set, it would fall back to the default?
any clarity on this one would, as ever, be amazin ;)
cheers,
jake
interestingly, i've been some debugging using a controller and it appears the ysod happens before it even gets to the controller...
Hi Jake,
Default Template in this situation means, when you have 2 or more templates assigned to a Document Type, the Default one is the first Template that will be auto assigned to content node which you create in the content section.
When you set a content node to choose, then the default template is not the one that will be used. It means no view is needed for this content node and therefore doesn't have a "real url" in the front end website.
Hope this helps!
/Michaël
hi michaël,
thank you for the reply - interesting!
i wonder if the real solution for this then is that the 'template' select doesn't show in the info tab for nodes based on doctypes without a template or only one template?!
the pain that i currently have is that i've changed the template name in a site and all the nodes that were based on that template have now reverted to 'choose...' in the template select! this means ysods for all those nodes...
the solution appears to be working through the site and selecting the template for each node...
i had it in my head that it'd fall back to the default!
thank you for the clarity on the issue ;)
cheers,
jake
Jake,
hmm interesting about the name update of a template that all content nodes aren't updated and fallback to no template.
Will check this!
You are correct, selecting the template of the nodes solves the problem.
Your welcome for the help!
Have a nice day!
/Michaël
Hi jake,
can you select the answer for this thread so that others can see the solution when they have the same problem?
Thanks!
Have a nice day!
/Michaël
is working on a reply...