We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 30884
    • 142 Posts
    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
      p i x e l p u s h e r e x t r o d i n a i r e
      A x i s A n i m a t i o n . c o m
      • 32982
      • 674 Posts
      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
        Jabiertxof (formerly XYZVISUAL)
        My bussines: http://marker.es
        https://www.youtube.com/user/jabiertxof/videos
        • 30884
        • 142 Posts
        Hey XYZ, No probs, thanks I’ll have a look at Wrapper and give that a try.
        Cheers

        TXRX
          p i x e l p u s h e r e x t r o d i n a i r e
          A x i s A n i m a t i o n . c o m
          • 30884
          • 142 Posts
          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
            p i x e l p u s h e r e x t r o d i n a i r e
            A x i s A n i m a t i o n . c o m
            • 33337
            • 3,975 Posts
            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.
              Zaigham R - MODX Professional | Skype | Email | Twitter

              Digging the interwebs for #MODX gems and bringing it to you. modx.link
              • 30884
              • 142 Posts
              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.
                p i x e l p u s h e r e x t r o d i n a i r e
                A x i s A n i m a t i o n . c o m
                • 30884
                • 142 Posts
                That works smiley Happy Days! Thanks!
                  p i x e l p u s h e r e x t r o d i n a i r e
                  A x i s A n i m a t i o n . c o m