Copied to clipboard

Flag this post as spam?

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


  • Jonathan Distenfeld 19 posts 163 karma points
    Feb 11, 2019 @ 08:38
    Jonathan Distenfeld
    0

    Best Practice with folder structure in content section

    Hi Community,

    we're currently running into a problem with a new Umbraco-Project (Version 7.13.1) by trying to structure our content nodes. We'd like to now if there is a "best practice" way to achive this.

    What we're trying to achive:

    We have a Content "Pages", which behaves like a folder and holds multiple "Page" document types - in this example content named "Home". (See image below) We'd like to have the "Home"-Content acting like an root-content and give it the URL "/" since it is the starting page. Basically we want "Pages" to not have a URL at all, so "Home" would be the first content at root.

    The problem we're running into:

    The content "Pages" automatically gets the URL "/" from Umbraco which is the reason why the "Home" content can't be accessed under the root URL "/". We know a few workaround for this, but they all have massive disadvantages and don't seem to be nice solutions to us (Build-In redirect properties, custom URLProvider, IIS-Rewrite Rules).

    Example: umbraco content structure URL

    Is there any other solution how to achive this? If not, what is the best-practice one?

    Thanks, Jonathan

  • Michael Nielsen 99 posts 619 karma points
    Feb 11, 2019 @ 11:36
    Michael Nielsen
    101

    Hi

    Right click on Home, and Select "Culture and Hostnames" and add a hostname to the node.

    That will make it the root node for your hostname.

  • Jonathan Distenfeld 19 posts 163 karma points
    Feb 11, 2019 @ 13:30
    Jonathan Distenfeld
    0

    Hello Michael,

    Thank you very much! we tried as you said and it worked pretty well.

    But we still have some questions: To avoid problems and changing-necessity for hostnames on deployment, we'd like to know if it's possible to add a virtual path or something to the "Culture and Hostnames" like "~/"? We actually tried "~/" and "/" but it's not valid. Is there some kind of expression that we can add?

    That way, we woudn't have problems between different environments and there is no necessity to add and change hostnames if they're changing.

  • Kieron 132 posts 338 karma points
    19 days ago
    Kieron
    0

    I like this for 'removing' nodes from URLs: https://our.umbraco.com/packages/website-utilities/virtualnodes/

  • Jonathan Distenfeld 19 posts 163 karma points
    19 days ago
    Jonathan Distenfeld
    1

    I also strumbled over the virtual nodes package, but this only removes the name from the urls of the child pages. So if I make "Pages" a virtual node, it still has the root URL "/" and the "home" content has the URL "/home" and not "/" which is what I want.

  • Kieron 132 posts 338 karma points
    19 days ago
    Kieron
    0

    Ah i get you. My bad.

    What if you made home a virtual node too?

  • Jonathan Distenfeld 19 posts 163 karma points
    19 days ago
    Jonathan Distenfeld
    0

    It woudn't make a difference in this case. "Pages" would still be "/" and "Home" would still be "/home".

    By making Home vitual, it's child would be "/child" instead of "/home/child" which is good in my case, but it doesn't solve my problem.

Please Sign in or register to post replies

Write your reply to:

Draft