You don't assign a template to it and it won't have a page. Or, you can assign a custom property to the Doc Type (umbracoRedirect) and just redirect to a page.
I don't think that the redirect is a perfect solution for me. I create a Root item in Content, called Widgets, where i placed all my wigets. So the widget right now gets a url like: /widget-name
Problem with Umbraco is (at least I think so) that every node has it's own URL.
If you don't assign a template the only thing that changes is that hitting the URL on the frontend will say "no template found ...".
Redirect isn't a perfect solution either. Why? Because you reserve an URL that could be used somewhere else. And you do already give the URL an behavior it shouldn't have as it should be none-existing for the frontend user.
You could return a 404 if the URL gets called directly (via your Controller).
But I don't think there's an easy way to disable URL generation for a node, correct in case this is wrong ;-)
Disable URL for some document types
Hey
I have a documenttype (Widgets) that should not have there own URL. Is it possible to disable URL for a documenttype?
/Jacob
You don't assign a template to it and it won't have a page. Or, you can assign a custom property to the Doc Type (umbracoRedirect) and just redirect to a page.
http://our.umbraco.org/wiki/reference/umbraco-best-practices/umbracoredirect
Ironically your link gives a 404
I don't think that the redirect is a perfect solution for me. I create a Root item in Content, called Widgets, where i placed all my wigets. So the widget right now gets a url like: /widget-name
Right now i use the template on the widgets:
@inherits Umbraco.Web.Mvc.UmbracoTemplatePage @{ Layout = null; }
On my pages I using a Content Picker, to select the widgets and i do this:
If I remove the template from the widget, how do i then Render the widget?
Problem with Umbraco is (at least I think so) that every node has it's own URL.
If you don't assign a template the only thing that changes is that hitting the URL on the frontend will say "no template found ...".
Redirect isn't a perfect solution either. Why? Because you reserve an URL that could be used somewhere else. And you do already give the URL an behavior it shouldn't have as it should be none-existing for the frontend user.
You could return a 404 if the URL gets called directly (via your Controller).
But I don't think there's an easy way to disable URL generation for a node, correct in case this is wrong ;-)
Anyone found a solution? ~ 3 years later.
is working on a reply...