We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 22825
    • 8 Posts
    I have an inbound link to a page that is just a weblink. So, the request starts off going to news.html?name=123 (where the name is variable)

    The weblink at news.html redirects to real-page.html, and that works fine, but it doesn’t pass the name parameter to real-page.html. Is there any way to force it to do so?

    -Paul
      • 12584
      • 208 Posts
      Quote from: pauljwelty at Apr 27, 2008, 08:15 AM

      I have an inbound link to a page that is just a weblink. So, the request starts off going to news.html?name=123 (where the name is variable)

      I needed to do something like this a while back and the code was in a snippet, this was the solution I used after help here

      echo ’<a href="’.$modx->makeUrl(32,’’,’search=title&year=’.$year).’">Title</a>’;

      Just change the 32 in my example to your page ID your link is on and the variables to what you need to send.

      Hope this points you in the right direction.

      Cheers
        • 7231
        • 4,205 Posts
        why not just use [~123~]?name=123 in the link field for the weblink. this will output the link to the document with the additional parameters.
          [font=Verdana]Shane Sponagle | [wiki] Snippet Call Anatomy | MODx Developer Blog | [nettuts] Working With a Content Management Framework: MODx

          Something is happening here, but you don&#39;t know what it is.
          Do you, Mr. Jones? - [bob dylan]
          • 28042 ☆ A M B ☆
          • 24,524 Posts
          The name is variable; you can’t just set its value in the weblink itself.
            Studying MODX in the desert - http://sottwell.com
            Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
            Join the Slack Community - http://modx.org
            • 22825
            • 8 Posts
            Thanks for the reply. Do you mean that the weblink can itself be a snippet? How is this accomplished?