Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Mike 16 posts 32 karma points
    Jun 24, 2009 @ 13:28
    Mike
    1

    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.

  • Morten Bock 1867 posts 2140 karma points MVP 2x admin c-trib
    Jun 24, 2009 @ 13:36
    Morten Bock
    2

    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?

  • Mike 16 posts 32 karma points
    Jun 24, 2009 @ 14:30
    Mike
    0

    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.

  • Morten Bock 1867 posts 2140 karma points MVP 2x admin c-trib
    Jun 24, 2009 @ 23:46
    Morten Bock
    0

    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?

  • Aaron Powell 1708 posts 3046 karma points c-trib
    Jun 25, 2009 @ 14:18
    Aaron Powell
    2

    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.

  • Hendy Racher 863 posts 3849 karma points MVP 2x admin c-trib
    Jul 18, 2009 @ 16:55
    Hendy Racher
    0

    Is there any way of clearing a URL via an event handler ?

  • Aaron Powell 1708 posts 3046 karma points c-trib
    Jul 20, 2009 @ 01:00
    Aaron Powell
    1

    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.

  • Matt Watson 33 posts 55 karma points
    Nov 01, 2011 @ 16:32
    Matt Watson
    0

    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.

  • Christian Rieß 24 posts 46 karma points
    Mar 23, 2012 @ 15:23
    Christian Rieß
    0

    Matthew Watson, Your tip saved our lives (and our weekend) :D

  • mithun 42 posts 63 karma points
    Feb 22, 2013 @ 11:11
    mithun
    0

    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


  • Leo bear 2 posts 22 karma points
    Jun 28, 2013 @ 20:58
    Leo bear
    0

    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!

  • Leo bear 2 posts 22 karma points
    Jul 01, 2013 @ 22:27
    Leo bear
    0

    Kindly help me! :(

Please Sign in or register to post replies

Write your reply to:

Draft