Copied to clipboard

Flag this post as spam?

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


  • Tom 3 posts 23 karma points
    Apr 24, 2013 @ 16:28
    Tom
    0

    How to restrucure URLs to omit some parent folders

    Hi, 

    I am looking to restructure the URLs of some pages without having to restructure where the content is in Umbraco. 

    Example.

    Services > Insurance > Home Insurance

    =

    services/insurance/home-insurance

    How can it be displayed as this /insurance/ and /home-insurance/

    I know there would be an issue with duplicates but I am certain there will be no duplicates. I also do not need to apply this restructuring to all pages just select, high-level pages. 

    All thoughts welcome.

    Thanks,

  • Rich Green 2246 posts 4008 karma points
    Apr 24, 2013 @ 16:33
    Rich Green
    0

    Hey Tom,

    Welcome to the forum!

    Sorry but I do not understand your question, specifically this line "How can it be displayed as this /insurance/ and /home-insurance/"  what do you mean by "it"

    It might help to post a picture of your content tree.

    Rich

     

  • Tom 3 posts 23 karma points
    Apr 24, 2013 @ 17:17
    Tom
    0

    Hi Rich, 

    Thanks for getting back to me so quickly. By it I mean the URL. 

    I basically want to hide certain parts of the tree from the URL that is generated for a page. 

    In the example I gave "services/insurance/home-insurance" I want to be able to hide "services/insurance/" and only display "/home-insurance/" in the URL. 

    I'll give a full URL as reference. 

    Current URL: www.acmeinsurance.com/services/insurance/home-insurance

    Desired URL: www.acmeinsurance.com/home-insurance

    The page has not moved in the content tree but "services/insurance/" is hidden.

    Thanks, 

    Tom

  • Rich Green 2246 posts 4008 karma points
    Apr 24, 2013 @ 17:42
    Rich Green
    1

    Hey Tom,

    On your DocType for /insurance add a property called "umbracoUrlAlias" of type TextString

    Have a look here http://our.umbraco.org/wiki/reference/umbraco-best-practices/umbracourlalias

    Rich

  • Chriztian Steinmeier 2800 posts 8791 karma points MVP 8x admin c-trib
    Apr 24, 2013 @ 17:49
    Chriztian Steinmeier
    0

    Hi Tom,

    You should look into the special umbracoInternalRedirectId property - If you create a simple Alias DocumentType with a property named umbracoInternalRedirectId, you can create a document at the desired URL (e.g. /home-insurance) which simply loads the other page internally with no redirection.

    The tricky part is that you'll need to use the Alias page's id when building navigations and links etc., which can be tricky (if you really don't want people to land on the expanded URLs).

    If you just need to be able to supply the short URL for marketing purposes, consider using the umbracoUrlAlias property instead (on the real content node) - this will allow you to have multiple aliases (home-insurance, homeinsurance etc.) or the same content - but the URL will be the "long" Umbraco URL.

    /Chriztian

  • Tom 3 posts 23 karma points
    Apr 24, 2013 @ 17:51
    Tom
    0

    Thanks both for your suggestions. I'll look into these and let you know how it goes. 

    Tom

Please Sign in or register to post replies

Write your reply to:

Draft