Hi there,
I’ve been bangin the old noggin against the keyboard trying to figure out how to pass a visitor to an external link (aka clients website for example)
I keep getting
http://modxserverip/cms_root/www.google.com
(for example) whenever I insert the [+client_website+] place holder I made in some custom code.
When I echo the place holder there is nothing in front of the url that makes it want to stay internally.
it looks normal ie: www.google.com.
Please help!
Cheers
TXRX
you can open a new window whith javascript minus better whith target and another option is a iframe and make frames the later two are a bad solution but show a page into your page. there are a snippet called wapper can do it easy. sorry for my bad english
Hey XYZ, No probs, thanks I’ll have a look at Wrapper and give that a try.
Cheers
TXRX
Wrapper looks like it’s using Iframes. No way am I using that. Thanks for the help tho, I’ll be looking at writing in JS but that’s not ideal either. I thought this would be something that should obviously be working (or documented) in Modx.
Does anyone have any other ways to pass a url to get a user to an external link without having to resort to iFrames?
Cheers
TXRX
if you dont add http:// it will be shown as you are getting it now.
In your custom code, prefix the url with http:// or tell the content editors to add it while editing.
Hope this helps.
I should have known. lol. many thanks. I’ll inject the http:// in code and give it a try. I could not for the life of me get why that wouldn’t work. done so many searches for external link et al and this is the best news yet!
Many thanks
TXRX
ps: soz to be a p.i.t.a about it all. Site is almost completed (code and CSS wise) just losing patience which I shouldn’t I guess.
That works

Happy Days! Thanks!