Hi. I am new to DNN, so there may be a solution to a problem I am encountering. If so, pls point me to it.
I need to set up a site with multiple child portals, and also links to non-DNN stuff. Here are the problems I have:
1. If I need a link TO a child portal, I need to type in the full URL, including the host name. In some places, using the "~" trick works, but not all (see for example the Announcements module, it does not resolve the "~" in "more...". Same for pages(tabs) that are URLs)
2. If I need a link to a parent portal, not even the "~" will work.
3. If I need a link to non-dnn material, but hosted on the same machine, I need to type the "external" URL in full format, including the machine name
Now, why is this an issue ? Simply because of this: I have a "development" site and a "production" site. I want to be able to test everything in the development site, and then copy it to the production site. If URLs contain host names, this is clearly impossible.
The URL addressing scheme caters for this nicely. if a url does not contain a protocol and host, like this : "/main/something", it will be interpreted by the client browser to be : <current_protocol>://<curent_host>/main/something. This is standard technique for writing machine-relative URLS.
This is not possible in DNN. Looking at the source code, I find two places where this can be fixed:
The first, intrusive, way, would be to fix the ADDHTTP routine in globals.vb to not touch URLS that start with "/", as it already does for URLS that start with "~". This will probably solve the issue all over the place, but may have side effects that I cannot evaluate.
The second, non-intrusive way would be to fix the link Editor in UrlControl.vb. This control is , I think, the control used in DNN wherever a URL is to be typed. The bad thing about it is that it tries to be smart and canonicalize URLS, by calling ADDHTTP(). Simply removing this line would fix the issue IMHO.
I know how to do this trivial change myself. However, I am posting this question here for two reasons:
a. I suspect other people have come across this annoying behavior, and I would like to hear what workaround , if any, exists.
b. If my proposition sound reasonable, I would like to see it as part of the core distribution, so that I dont have to maintain it myself.
What does the community think ?