NiceUrl inserts incorrect parent node when using managed hostnames
I'm using a single Umbraco installation to manage multiple sites, but when using 'umbraco.library:NiceUrl(@id)' to create the site menus, it is inserting the parent node into the URL, even though the parent node has a hostname applied to it. This is the site structure:
Site1 (hostname: www.site1.com) --Page1 --Page2
...and it results in the following url for Page1: 'www.Site1.com/Site1/Page1', when I am wanting 'www.Site1.com/Page1'
Has anybody encountered this before, or do they know any work arounds?
I have already setup another site within the umbraco instance that requires umbracoHideTopLevelNodeFromPath to be set to true.
The strange thing is that under the properties tab for 'Page1', it shows the 'alternative link to document' correctly as 'www.Site1.com/Page1'. Its when I use NiceUrl that the parent node gets inserted in the URL.
I think I may have found the problem - When using multiple sites does the root node of the site have be a direct child of the content node? I'm using a folder to hold the extra sites which places them an extra level below the content node, eg...
content -MainSite --MainSitePage1 --MainSitePage2 -OtherSitesFolder --OtherSite1 (hostname specified for this node) ---OtherSite1Pages --OtherSite2 (hostname specified for this node) ---OtherSite2Pages
If i change the structure to this...
content
-MainSite
--MainSitePage1
--MainSitePage2
-OtherSite1 (hostname specified for this node)
--OtherSite1Pages
-OtherSite2 (hostname specified for this node)
--OtherSite2Pages
...then I get the correct the URL's for the 'other' sites.
NiceUrl inserts incorrect parent node when using managed hostnames
I'm using a single Umbraco installation to manage multiple sites, but when using 'umbraco.library:NiceUrl(@id)' to create the site menus, it is inserting the parent node into the URL, even though the parent node has a hostname applied to it. This is the site structure:
Site1 (hostname: www.site1.com)
--Page1
--Page2
...and it results in the following url for Page1: 'www.Site1.com/Site1/Page1', when I am wanting 'www.Site1.com/Page1'
Has anybody encountered this before, or do they know any work arounds?
Thanks!
Jonok,
Is value for umbracoHideTopLevelNodeFromPath in web.config set to "true"?
Cheers,
/Dirk
Yes Dirk, it is set to true
I have already setup another site within the umbraco instance that requires umbracoHideTopLevelNodeFromPath to be set to true.
The strange thing is that under the properties tab for 'Page1', it shows the 'alternative link to document' correctly as 'www.Site1.com/Page1'. Its when I use NiceUrl that the parent node gets inserted in the URL.
Thanks.
I think I may have found the problem - When using multiple sites does the root node of the site have be a direct child of the content node? I'm using a folder to hold the extra sites which places them an extra level below the content node, eg...
content
-MainSite
--MainSitePage1
--MainSitePage2
-OtherSitesFolder
--OtherSite1 (hostname specified for this node)
---OtherSite1Pages
--OtherSite2 (hostname specified for this node)
---OtherSite2Pages
If i change the structure to this...
content
-MainSite
--MainSitePage1
--MainSitePage2
-OtherSite1 (hostname specified for this node)
--OtherSite1Pages
-OtherSite2 (hostname specified for this node)
--OtherSite2Pages
...then I get the correct the URL's for the 'other' sites.
I've also experienced this. Bug or feature, would be nice to have it documented somewhere. Regards, Jonas
Any solutions for this problem? Or is the ´bug´ still pending?
is working on a reply...