Copied to clipboard

Flag this post as spam?

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


  • curtismccaw 28 posts 88 karma points
    Mar 25, 2023 @ 06:13
    curtismccaw
    0

    Document Type Children not getting parent url

    Hi,

    It's been a while since i've been completely under the hood with Umbraco and need some help.

    I have a global content repository for various items; staff directory and services etc with the rational being these items will be shared across multiple sites.

    staff directory

    The url for the staff directory as expected is /staff-directory/. However when I add child pages their url doesn't inherit the parent url. So their URL is just /curtis-mccaw/ etc. Rather than /staff-directory/curtis-mccaw/.

    Is there a way to achieve this, or a better way to set it up? Same with services too.

  • Huw Reddick 1929 posts 6717 karma points MVP 2x c-trib
    Mar 25, 2023 @ 15:05
    Huw Reddick
    100

    IIRC this is because your 'Staff Directory' is at the root level rather than a child of 'Global Homepage' if you move 'Staff Directory' so that it is a child of 'Global Homepage' then /curtis-mccaw/' will have a url of /staff-directory/curtis-mccaw/

  • curtismccaw 28 posts 88 karma points
    Mar 27, 2023 @ 09:11
    curtismccaw
    0

    Thanks Huw, that works well.

  • McGern 13 posts 44 karma points
    Mar 14, 2024 @ 14:23
    McGern
    0

    Hi.

    Do you know if there is another way to do it without moving content? I'm using umbraco headless and it has separate sections that represent different areas of concern, so I don't have a single root. This probably goes against what Umbraco is usually used for, but if I can set a url on the root node, it would be nice if the children could follow suit.

    Thanks.

  • Danine Noble 82 posts 368 karma points
    Mar 15, 2024 @ 14:38
    Danine Noble
    0

    Have you tried assigning the specific path (via Cultures & Hostnames) to the sibling root nodes to force it to have a specific URL that you want?

    Items that are actually organized as real children already automatically inherit the appropriate URL chain for their path.

    If you do not have items organized as children and are instead siblings of a root node that has an assigned domain they do not inherit the siblings root. Cause that would be bad for a real multi-site situation :p


    In an example, having a Home node & a sibling Global Content folder with the header/footer in it. These global items need to have their markup exposed for other internal applications to pull, so they have like "/external/header" set as the domain field.

    This makes them viewable (assuming they have a template assigned of course) via "https://sitename.com/external/header" for example, even though they are not direct children of the Home item that has the site domain set.

  • McGern 13 posts 44 karma points
    Mar 16, 2024 @ 01:56
    McGern
    1

    Hi Danine,

    Thank you so much! Your reply explained the issue very well, and your example is reasonably similar to what I have i.e. multiple roots, but not necessarily multiple sites.

    I had tried setting the hostname, but didn't understand it properly. I set a domain (which I didn't want), but didn't realise about just setting a path - I clearly hadn't read the description properly and thought it was just about setting language paths.

    This seems to be exactly what I'm looking for, now onto the next challenge...

    Kind regards, Jarrod

Please Sign in or register to post replies

Write your reply to:

Draft