Copied to clipboard

Flag this post as spam?

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


  • Michael Wilkinson 10 posts 90 karma points
    Jan 06, 2019 @ 16:23
    Michael Wilkinson
    0

    Hello all

    I am using version 7.12.4 and I'm trying to use the umbracoUrlName routing property type. The documentation seems to be out of date as it refers to a type of text string, but I can't select that. I can however selected a textbox which is what I have done.

    This is what I have in the document type:

    enter image description here

    When I enter a value in the content and republish, the new url is not used at all and if I navigate to it, I get a 404 error. Is there something I have missed along the way?

    Many thanks in advance.

    Michael

  • Nigel Wilson 944 posts 2076 karma points
    Jan 06, 2019 @ 21:07
    Nigel Wilson
    0

    Hi Michael

    I might be wrong but maybe umbracoUrlAlias is the property you need ?

    https://our.umbraco.com/Documentation/Reference/Routing/routing-properties

    Cheers

    Nigel

  • Marc Goodson 2141 posts 14324 karma points MVP 8x c-trib
    Jan 07, 2019 @ 00:01
    Marc Goodson
    2

    Hi Michael

    umbracoUrlName will just change the portion of the url (or slug) that the page would normally generate via it's Name property.

    and

    umbracoUrlAlias will allow you to provide a comma delimited string of full alternative urls to load the page under.

    eg

    enter image description here

    resulting in the page being available under /blogs/justthisportionchanges

    enter image description here

    and also under

    /set/additional/fullurl

    and

    /another/seperatedwith/commas

    enter image description here

  • Michael Wilkinson 10 posts 90 karma points
    Jan 07, 2019 @ 08:53
    Michael Wilkinson
    0

    Marc, Nigel

    Thank you very much. I have it working now thank you, My mistake was thinking the umbracoUrlName would change the entire path.

    Now that I have a whole new url for a page, can I stop the original url it's been given from existing? The reason being that one of the pages is a parent menu item but doesn't have a page itself. It's a parent for a sub menu. In theory, the parent item should never be found by a user as the url will never be output, but I'm thinking for SEO purposes in case a bot finds it when it crawls the site. I could add the umbracoRedirect field to that parent item to always go to the first in the dropdown list, but I'd rather the url just didn't exist on the site at all.

    I'd be happy to mark this as accepted and raise a new issue if that helps?

    Many thanks again, Michael

  • carl 12 posts 81 karma points
    Dec 07, 2021 @ 14:14
    carl
    0

    Hey Marc, How did you figured it out. ? Currently in the same situation.

  • Marc Goodson 2141 posts 14324 karma points MVP 8x c-trib
    Dec 07, 2021 @ 20:43
    Marc Goodson
    0

    Hi Carl

    You could create a custom UrlProvider to remove the 'segment' of the parent 'holding' node from the Url?

    https://our.umbraco.com/Documentation/Reference/Routing/Request-Pipeline/outbound-pipeline#custom-url-provider

    and a custom ContentFinder to 'find it'

    https://our.umbraco.com/Documentation/Reference/Routing/Request-Pipeline/IContentFinder

    (I'm linking to V9 articles here, but there are V8/V7 equivalents if that's the version you are looking for).

    There is an article on the Moriyama site around a solution using 'hidden' folders that might provide some inspiration:

    https://moriyama.co.uk/about-us/news/blog-umbraco-hidden-folders/

    regards

    Marc

Please Sign in or register to post replies

Write your reply to:

Draft