All nodes will get a URL when they are published. What I have sometimes done is to create a template for those subnodes that just contains a response.redirect that sends the user/robot/whatever to the parent node.
Is there a certain scenario where you have a problem with the URL's being there?
Yes, I understand the structure, but I'm not sure that I see a big problem with the fact that the node has a URL, as long as you are not using it for anything?
Actually it is possible if you're using the Umbraco API to create the Document objects yourself to create and publish them without a URL. If you don't call new umbraco.content().UpdateDocumentCache it wont update the XML and wont register a URL in the Admin UI (although I don't know what would happen if you tried to browse to it, that I didn't try out).
The best practice for this is to have a Redirect Node ID/ URL on the doc type which will then be combined with a redirect template to send the users browser to the previous page.
You would need to remove the node from the XML I believe, as I'm pretty sure that's where the URL is generated via (which is why my above mentioned method call is required). That means you would need to locate the XML of the node in the umbraco.config file and then remove it. Probably not a trivial task, but I think there is an API call to do it.
I'll have a look and see if there is an API call to remove the XML.
Document Types without "link to document"
I'm doing document types, without a need for a seperate page!
(like a gallery photo).
They're rendered within the parent document type's template.
The child types don't even have an own template assigned.
But nevertheless Umbraco (v.4) generates a URL for them (although the page is empty).
Is there any way to specify a document type, which doesn't have a valid URL?
thanks a lot,
mike.
Hi Mike
All nodes will get a URL when they are published. What I have sometimes done is to create a template for those subnodes that just contains a response.redirect that sends the user/robot/whatever to the parent node.
Is there a certain scenario where you have a problem with the URL's being there?
It's for gallery, or event calendar for instance.
Where I have a single event appointment, that just shows up in an overall calendar, but doesn't need a seperate page.
Yes, I understand the structure, but I'm not sure that I see a big problem with the fact that the node has a URL, as long as you are not using it for anything?
Actually it is possible if you're using the Umbraco API to create the Document objects yourself to create and publish them without a URL. If you don't call new umbraco.content().UpdateDocumentCache it wont update the XML and wont register a URL in the Admin UI (although I don't know what would happen if you tried to browse to it, that I didn't try out).
The best practice for this is to have a Redirect Node ID/ URL on the doc type which will then be combined with a redirect template to send the users browser to the previous page.
Is there any way of clearing a URL via an event handler ?
You would need to remove the node from the XML I believe, as I'm pretty sure that's where the URL is generated via (which is why my above mentioned method call is required). That means you would need to locate the XML of the node in the umbraco.config file and then remove it. Probably not a trivial task, but I think there is an API call to do it.
I'll have a look and see if there is an API call to remove the XML.
If your link to document is just a hash #, ive found that right clicking and moving the parent node to the same place will rebuild the links.
Matthew Watson, Your tip saved our lives (and our weekend) :D
Hi Matt,
My umbraco version is 4.7 ." moving the parent node to the same place will rebuild the links "
Is not working in our sit
please help
regards
mithun
I am having HASH SYMBOL problem only when I am using 'post at date' option but not when I post an article manually.. Kindly give me a solution!
Kindly help me! :(
is working on a reply...