I am on test.com/local site and when I call umbraco.library.NiceUrl(123) prior calling basemethod it returns a relative path i.e., (/testFolder/test.aspx)
However, if I try to call the same logic [umbraco.library.NiceUrl(123)] from the same site [test.com/local] after I have called basemethod then I get absolute path (test.com/abc/testFolder/test.aspx).
Can anybody please explain why I am getting absolute path with different domain. Is there a way to still find relative path once I call basemethod?
I also noticed that If I add [test.com] on managed hostname under site 1 then I will start receiving relative path on site 1. If I added on site 2 only then I will receive relative path on site 2. However, I cannot add same hostname in more than one location. Since I get absolute path from NiceUrl, it seems that it is pointing to different host name.
For Instatnce, if I am on the Site 1 (test.com/local) and trying to access test.aspx (nodeID 123) it returns (test.com/abc/testFolder/test.aspx)
Therefore, I am looking for relative paths from NiceUrl. Any suggestions please?
NiceUrl returns absolute path once basemethod is called
I have recently upgraded my umbraco from 4.7.1.1 to 4.11.10 where I have multiple sites with multiple hostnames defined for one site.
I am on test.com/local site and when I call umbraco.library.NiceUrl(123) prior calling basemethod it returns a relative path i.e., (/testFolder/test.aspx) However, if I try to call the same logic [umbraco.library.NiceUrl(123)] from the same site [test.com/local] after I have called basemethod then I get absolute path (test.com/abc/testFolder/test.aspx).
Can anybody please explain why I am getting absolute path with different domain. Is there a way to still find relative path once I call basemethod?
I also noticed that If I add [test.com] on managed hostname under site 1 then I will start receiving relative path on site 1. If I added on site 2 only then I will receive relative path on site 2. However, I cannot add same hostname in more than one location. Since I get absolute path from NiceUrl, it seems that it is pointing to different host name.
For Instatnce, if I am on the Site 1 (test.com/local) and trying to access test.aspx (nodeID 123) it returns (test.com/abc/testFolder/test.aspx)
Therefore, I am looking for relative paths from NiceUrl. Any suggestions please?
is working on a reply...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.