We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 51020
    • 670 Posts
    Hi,

    In my resource tree I'm adding a few useful links to external sites.
    These are created as Weblinks.

    Then outputting those in pdoMenu in my sidebar
    What Modx is doing is creating a 301 redirect from /my-external-link.html to http://www.example.com
    So if user hovers over the link, the URL that is displayed in the browser Status Bar makes it look like an internal page - I want to show the link as being external and show the destination URL.
    Also, if the full url is there, I can use CSS to show that it's going to take you to another site.

    Is this possible?
    Thanks
    Andy

    This question has been answered by tm2000. See the first response.

      • 38783
      • 571 Posts
      I have just tried doing this on a site and the weblink works in the way that you are hoping it would. ie - it links correctly to the external website, and hovering displays the full url of the external site. However, I am using Wayfinder to generate the menu. So perhaps pdoMenu handles weblinks differently?
        If I help you out on these forums I would be very grateful if you would consider rating me on Trustpilot: https://uk.trustpilot.com/review/andytough.com

        email: [email protected] | website: https://andytough.com
        • 51020
        • 670 Posts
        Quote from: andytough at Jul 21, 2017, 03:20 PM
        I have just tried doing this on a site and the weblink works in the way that you are hoping it would. ie - it links correctly to the external website, and hovering displays the full url of the external site. However, I am using Wayfinder to generate the menu. So perhaps pdoMenu handles weblinks differently?

        Hmm - I normally use wayfinder, but decided to make the jump over to pdoresources on this site. I hope there's a solution! Thanks for checking.
          • 51020
          • 670 Posts
          Quote from: andytough at Jul 21, 2017, 03:20 PM
          I have just tried doing this on a site and the weblink works in the way that you are hoping it would. ie - it links correctly to the external website, and hovering displays the full url of the external site. However, I am using Wayfinder to generate the menu. So perhaps pdoMenu handles weblinks differently?

          I just foudn the solution - it's in the docs!! I ready them twice and missed this!!

          &useWeblinkUrl=`1`
          



          I need more coffee...

          A
            • 51020
            • 670 Posts
            Quote from: tm2000 at Jul 21, 2017, 04:05 PM
            Quote from: andytough at Jul 21, 2017, 03:20 PM
            I have just tried doing this on a site and the weblink works in the way that you are hoping it would. ie - it links correctly to the external website, and hovering displays the full url of the external site. However, I am using Wayfinder to generate the menu. So perhaps pdoMenu handles weblinks differently?

            I just foudn the solution - it's in the docs!! I ready them twice and missed this!!

            &useWeblinkUrl=`1`
            



            I need more coffee...

            A

            Actually - this doesn't fix it - it's on by default - the docs say:


            When set to 1, the URL specified in a weblink resource will be output to the placeholder «[[+link]]» instead of the link to the weblink resource itself.

            But it doesn't seem to be working on my site!

            Andy
              • 38783
              • 571 Posts
              Interesting. I am thinking of moving to pdoMenu so I will store that little bit of information away for the future.
                If I help you out on these forums I would be very grateful if you would consider rating me on Trustpilot: https://uk.trustpilot.com/review/andytough.com

                email: [email protected] | website: https://andytough.com
                • 51020
                • 670 Posts
                I found the solution -

                &useWeblinkUrl=`1`
                Generate link to the weblink resource, not to the destination URL. NOTE: To get this properly working, be sure to use [[+link]] instead of [[~[[+id]]]] eg. <a href="[[+link]]">[[+pagetitle]]</a>.

                Works a treat.
                • discuss.answer
                  • 51020
                  • 670 Posts
                  Quote from: andytough at Jul 21, 2017, 04:08 PM
                  Interesting. I am thinking of moving to pdoMenu so I will store that little bit of information away for the future.

                  I found the solution if you're interested!

                  &useWeblinkUrl=`1`
                  Generate link to the weblink resource, not to the destination URL. NOTE: To get this properly working, be sure to use [[+link]] instead of [[~[[+id]]]] eg. <a href="[[+link]]">[[+pagetitle]]</a>.
                    • 38783
                    • 571 Posts
                    Thanks!
                      If I help you out on these forums I would be very grateful if you would consider rating me on Trustpilot: https://uk.trustpilot.com/review/andytough.com

                      email: [email protected] | website: https://andytough.com