We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 36782
    • 109 Posts
    Hello,
    I bet this is a silly question...

    I'm using weblink resources to link to external pages; but they keep bouncing me to my homepage (which is my 404 during development)

    I'm using getResources, and have the following in my tpl's as a fix, but I'd love to know how to get the behaviour I remember from Evo back (any visit to a weblink resource would go to the destination):

    <a href="[[+class_key:equals=`modWebLink`:then=`[[+content]]`:default=`[[~[[+id]]]]`]]" title="[[+description]]">
    	[[+longtitle]]
    </a>


    ... it doesn't seem like that should be necessary...
      • 30912
      • 463 Posts
      Surely

      <a href="[[~[[+id]]]]" title="[[+description]]">
          [[+longtitle]]
      </a>


      Would suffice, thats how i usually have mine set up, as it checks the the id, then if its a weblink it already knows to look at the content URL. the only change i'd add is to add target="_blank" but thats just me
        • 36782
        • 109 Posts
        Hi
        thnx, I do appreciate the reply.
        The issue I'm having is that simply going to the id of the weblink is not taking me to the weblink destination, but rather to http://mydomain.com/weblink.html (where mydomain is the domain of my site, and weblink is the name of the weblink resource.)
        The only way I'm able to get the behaviour I was expecting was to do this silly filter on the class key...

        But as I said, I do appreciate it; what you have done is confirmed for me that I have a configuration error or something, and that I'm not getting the default weblink behaviour.

        Anyone got any hints? run into this before?

        -g

        PS: I apologize for forgetting to give my specs:
        Revo 2.2.0
        Apache server on Linux system, PHP 5.3, etc. [ed. note: unsub777 last edited this post 14 years, 6 months ago.]
          • 3749
          • 24,544 Posts
          Do you have the full URL (e.g., http://somesite.com/page.html) in the content field of the weblinks?


          ------------------------------------------------------------------------------------------
          PLEASE, PLEASE specify the version of MODX you are using.
          MODX info for everyone: http://bobsguides.com/modx.html
            Did I help you? Buy me a beer
            Get my Book: MODX:The Official Guide
            MODX info for everyone: http://bobsguides.com/modx.html
            My MODX Extras
            Bob's Guides is now hosted at A2 MODX Hosting
            • 30912
            • 463 Posts
            The other thing to notice, is that when you ahve a weblink it will show the URL of the weblink - not the actual weblink itself.

            i.e www.myurl.com/weblink bu your actual weblink might be www.abcdef.com (in which case the weblink wont work as i i believe it needs the http:// to be http://www.abcdef.com

            edit: doh, just seen Bob's reply.
              • 36782
              • 109 Posts
              Hi
              sorry for delay,

              @Bob: yes, I have the full url in there.
              @Tyreal2012: smiley