The first URL above returns an empty page (of course). Or even an error if the template expects property values that are not provided by actual content.
The second URL works as expected and returns a full customer summary, populated as expected.
My questions are:
Can I prevent the direct link from working, so as not to confuse users?
Accessing a razor template directly?
Greetings. I am using Umbraco 6.1.5
Background
I have a razor template defined called "CustomerMasterWithNavigation.cshtml".
Under the back office Content tab, various content pieces make use of this template.
I have noticed that both of the following URLs return results:
http://mysite.com/CustomerMasterWithNavigation
(calling the template directly)and
http://mysite.com/active-customers/acme-customer-summary
(a content node)The first URL above returns an empty page (of course). Or even an error if the template expects property values that are not provided by actual content.
The second URL works as expected and returns a full customer summary, populated as expected.
My questions are:
Can I prevent the direct link from working, so as not to confuse users?
Thanks,
Eric
Hi Eric,
This function is called "alt template" and you can find out how to disable it in this post.
Jeavon
Great. Thanks for the quick cross reference to the actual name for the feature I found and the link. My issue is solved.
Fantastic! You should have a green tick that you can click on the above answer to mark it as solved.
is working on a reply...