Copied to clipboard

Flag this post as spam?

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


  • Alex 8 posts 88 karma points
    Feb 07, 2019 @ 11:50
    Alex
    0

    Child pages without changing slug

    Is it possible to group pages in the back office without adding making the slug longer?

    E.g. currently under home I have /landing-page/

    And as I create more I want to keep them together without having

    /landing-pages/landing-page/

    Does anyone know of a good way of managing this?

  • Chris Norwood 23 posts 228 karma points
    Feb 07, 2019 @ 11:56
    Chris Norwood
    1

    I think you have to have a separate node so the default slug will always be longer, but you can add a special field to your document type that lets you specify a list of alternative URLs as a comma separated list.

    The field has to be called Umbraco Url Alias (generates a field called umbracoUrlAlias) and you enter the alternative URLs as a comma separate list, e.g. for above if you enter lp, lp1 then

    /landimg-pages/lp

    and

    /landing-pages/lp1

    will both point to that document (as well as the default landing-page slug).

    Not sure how easy this is to manage (you can easily generate conflicts), but it is automatic and built into Umbraco.

  • Alex 8 posts 88 karma points
    Feb 07, 2019 @ 15:12
    Alex
    0

    Awesome, thanks Chris.

    Its a shame about the separate node though.

  • Louis Jackson-Rees 91 posts 317 karma points c-trib
    Feb 07, 2019 @ 17:07
    Louis Jackson-Rees
    100

    You could set up a folder doctype to group nodes and then have the child nodes use the umbracoUrlAlias that is the url of that page minus the url of the parent page (the folder)

  • Alex 8 posts 88 karma points
    Feb 08, 2019 @ 08:41
    Alex
    0

    Brilliant - Not sure how I didn't come to that conclusion myself following Chris' reply.

    Thanks both!

  • Yakov Lebski 213 posts 845 karma points
    Feb 08, 2019 @ 10:25
    Yakov Lebski
    1

    I think using umbracoUrlAlias can create multiple url for the same page. I'm using this package to remove folders from URL - "Omit Segments" Url Provider

Please Sign in or register to post replies

Write your reply to:

Draft