Reputation: 5162
Let's say I have structure of Umbraco site as
- Node1
- Node2
- Node3
- Node4
- Node5
How can I ask Umbraco to render path when I visit lower level of nodes, such as http://myserver/Node1/Node2.aspx instead of just http://myserver/Node2.aspx?
Upvotes: 0
Views: 926
Reputation: 6304
Because Umbraco is set up to host multiple websites on one installation, the way they've set up the URL generation encourages you to add first-tier nodes to represent your site then under each of these nodes you can add your "actual" content nodes.
A typical setup could look like this:
- Content // The default node of the Content section, you don't need to add this.
- Mysite
- Node1
- Node2
- Node3
- Node4
- Node5
+ Mysecondsite
+ Mythirdsite
This will ensure that your URLs come out as follows:
http://www.mysite.com/Node1.aspx
http://www.mysite.com/Node1/Node2.aspx
http://www.mysite.com/Node1/Node2.aspx
To easily update your Umbraco, just create a site document type, make sure all the relevent pages are allowed as children, then create the site node and move all your existing content under it. You'll probably want the site to default to Node1
when visiting it in a browser, so refer to the following question asked recently on how to set that up: How to set up Umbraco to default in a subpage?
There's no need to add other sites to your Umbraco to get this working, I just added them for demonstration. However, if you do want to add other sites, don't forget to add the hostnames to IIS as well as the Manage Hostnames option upon right-clicking the site nodes, but there's no need if there's only one site.
Upvotes: 2