Copied to clipboard

Flag this post as spam?

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


  • jonok 297 posts 658 karma points
    Dec 16, 2009 @ 04:59
    jonok
    0

    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!

  • Dirk De Grave 4541 posts 6021 karma points MVP 3x admin c-trib
    Dec 16, 2009 @ 09:31
    Dirk De Grave
    0

    Jonok,

    Is value for umbracoHideTopLevelNodeFromPath in web.config set to "true"?

     

    Cheers,

    /Dirk

  • jonok 297 posts 658 karma points
    Dec 16, 2009 @ 11:19
    jonok
    0

    Yes Dirk, it is set to true

  • jonok 297 posts 658 karma points
    Dec 16, 2009 @ 11:37
    jonok
    0

    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.

  • jonok 297 posts 658 karma points
    Dec 16, 2009 @ 22:40
    jonok
    1

    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.

  • Jonas Eriksson 930 posts 1825 karma points
    Dec 23, 2009 @ 05:40
    Jonas Eriksson
    0

    I've also experienced this. Bug or feature, would be nice to have it documented somewhere. Regards, Jonas

  • Joel 40 posts 62 karma points
    May 10, 2011 @ 13:32
    Joel
    0

    Any solutions for this problem? Or is the ´bug´ still pending?

Please Sign in or register to post replies

Write your reply to:

Draft