How do you get the Rhythmyx Server Hostname in a Velocity Template

What is the velocity or Jexel code is to get the Rhythmyx host from a velocity template page source or from within the Jexel binding?

We currently have this hard coded in the template, I we need replace this with a velocity method or jexel method.

Thanks in adv

Tyrone

So far this post has got 40 views but no response, any takers out there?

I did a quick look and I do not see any velocity ways to get what you are looking for. I did find you can use some javascript to at least get the ip of server. Not sure if you are looking to get a FQDN of the server or if just the ip address will be enough. The javascript I used is as follows window.location.hostname this will get the ip of the server severing up the page.

If you use javascript, you would be getting the Rhythmyx host from the end user, so it would only work on preview (obviously once the page is published, ideally the host name of how it is delivered would be different than the RX server). I am just curious as to why you need the host name. Have you looked at $rx.link.getAbsUrl? I would parse the string that it returns to get the host name. Alternatively, you may be able to directly query the server configuration (can’t say exactly how to do it without looking into it)

You could wrap this in a custom jexl extension.

return PSServer.getFullyQualifiedHostName();

-n