Understanding paths of multiple root nodes

Looking for some explanation on how urls are handled for root nodes in Umbraco.

Assume this basic setup scenario.
We have a single node “Home” of documenttype homePage at root.

Add another doctype categories which you also allow to be placed as a root node, then add this node.

Now we have in our tree both Home and “Categories” on the same level, siblings if you will. The first Home node we created “claimed” the root path, so if you check Info panel under “Links” we see that:

Home: /
Categories: /categories

So far so good.

Now, let’s create a contentPage document under Home, and a category document under Categories.

Our tree looks like this:

  • Home
    • My content page
  • Categories
    • Butterflies

I would expect the paths under Links to be like this:

  • Home /
    • My content page /my-content-page
  • Categories /categories
    • Butterflies /categories/butterflies

But instead, Butterflies simply becomes /butterflies.

Is there any way to keep categories “out” of the Home node here, but yet still let it affect the url/path base for my categories?

This setup becomes a problem when I already have a page named Butterflies, like this:

  • Home /
    • My content page /my-content-page
    • Butterflies /butterflies
  • Categories /categories
    • Butterflies /butterflies - Can’t save this document with a path, it is colliding with the content page “Butterflies”! What to do?

I would like to both keep categories out of home node and be able to create a document which has the same name and path as the example illustrates.

Hi

Maybe setting a hostname for “categories” would be a solution.

Now:

1 Like

Beautiful solution, thank you Robert.

I hadn’t realized that the hostnames section could be used for this.

1 Like

This topic was automatically closed 5 days after the last reply. New replies are no longer allowed.