Copied to clipboard

Flag this post as spam?

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


  • Marek 4 posts 84 karma points
    Jun 29, 2020 @ 11:15
    Marek
    0

    Umbraco routing not working outside Home node

    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

  • Richard Hamilton 36 posts 158 karma points
    Jun 29, 2020 @ 16:02
    Richard Hamilton
    0

    Because this isn't the way Umbraco is meant to work. In your case, 'Foo' is a homepage in its own right.

    What are you trying to achieve by doing this?

  • Richard Hamilton 36 posts 158 karma points
    Jun 29, 2020 @ 16:10
    Richard Hamilton
    100

    The setting that relates to this is

    <add key="Umbraco.Core.HideTopLevelNodeFromPath" value="true" />
    

    But you would end up with

  • Marek 4 posts 84 karma points
    Jun 30, 2020 @ 06:54
    Marek
    0

    What are you trying to achieve by doing this

    I have some nodes dedicated to storing website settings, for example number of posts per page. These nodes don't have an associated view and are not intended to be rendered. That's why I thought it would make sense to put them outside of Home.

  • Richard Hamilton 36 posts 158 karma points
    Jun 30, 2020 @ 17:40
    Richard Hamilton
    0

    Then what you are doing is correct. They are not mean to be routed / navigated to from the site.

    So therefore they won't have a url associated with them.

Please Sign in or register to post replies

Write your reply to:

Draft