Forum OpenACS Q&A: Re: Getting URL

Collapse
6: Re: Getting URL (response to 1)
Posted by bill kellerman on
Check the aolserver tcl api at http://www.aolserver.com/docs/devel/tcl/api/conn.html#ns_conn

From the docs:
"ns_conn location returns the location string for this virtual server in the form: protocol://hostname[:port]"

In your tcl file, set hostlocation [ns_conn location].
In your adp file, display <a href="@hostlocation@/forums/">mesgag ba0rd</a> for the appropriate location.

[note that ns_info location is obsolete.]

You can also use relative also as has been mentioned  (../forums, ../notes).

...might be a better way to do this.  check the genius bar.