2
votes

To reproduce the issue create the following hierarchy:

  • Content
    • Home
      • Foo
        • Bar - The published URL will be <domain>/foo/bar
    • Foo
      • Bar - The published URLwill be <domain>/bar

Why does umbraco skip /foo/ when creating a page outside of Home? Is there a way to make nodes outside of Home stack the path as the nodes under Home?

Umbraco v7

2
Check Foo nodes for assigned hostnames, maybe? You can basically set a hostname for any node in the content tree, which can confuse things (if one of the Foo nodes has the "root" website URL set as a hostname, all children URLs will relate to that hostname).Jannik Anker
I've checked my setup and I'm not running a multisite config. No culture or hostnames have been set.hidarikani

2 Answers

1
votes

Home is your root node so / will show your home page and /foo/ will show the home>foo page.

The only way to show nodes under the root foo node is to provide a hostname on the root foo node using 'culture and hostnames'

Obviously once you do that, you will also have to set that hostname up as a binding on the same website in iis as well.

It would probably also be good practice to set a hostname for the home node as well if you add one for the foo node

0
votes

I've managed to understand what's going on with the help from Umbraco community.

By default umbraco treats each child of Content as a root node aka home page. This is controlled by the following setting in web.config <add key="Umbraco.Core.HideTopLevelNodeFromPath" value="true" />

If I would extend my example by adding 3rd level like so: Content > Foo > Bar > Baz I would see that the published path of Baz is /bar/baz. Umbraco does stack the path but it removes the 1st level because it's considered the default route.