XF 2.2 Finding domain name for conditional

PrettyPixels

Well-known member
Licensed customer
Is there an equivalent to $_SERVER['HTTP_HOST'] that I can use in the PAGE_CONTAINER template? I'm pointing two domains to a forum and need to write a conditional around which domain name is accessing.

Any suggestions on the best way to do this are appreciated. :)
 
TIL 🙃

I thought this was quite easy with something like $xf.request.server..., but this does not work (server error).

You can use: $xf.request.getServer('HTTP_HOST') :)
 
Back
Top Bottom