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

    I'm currently trying to use weblinks with parameters but can't find out how to make them stay when redirecting to the weblinks location.

    The scenario I'm in:

    We have Context A with a domain of a.example.com. In this context we have a weblink pointing to Context B on domain b.example.com. Now, when I am using the Link A it opens up the URL a.example.com/weblink/?parama=a&paramb=b&etc and takes me to b.example.com/site but without the parameters.

    How can I make the parameters stay?

    I thought of creating my own document type which would be a rip off of the original weblink, but with the parameters, but then I thoght, "hey, you can't be the first person wanting to do so" ^^

    So If anyone of you have done this before, pls give me a hint on how to make this as easy as possible. Thanks! wink

    PS: for the meantime I'm going to create a Template, which I can then use instead of the document type, but I would like to have it done more elegantly and using the right tools to get my way. Thanks again! smiley
      • 30585
      • 833 Posts
      Try this in your Weblink content field:
      [[~##? &propa=`valuea` &propb=`valueb`]]
      // Where ## is the id of the target resource
      


      This should produce a URL with the following structure: http://b.example.com/site?propa=valuea&propb=valueb [ed. note: treigh last edited this post 7 years, 2 months ago.]
        A MODx Fanatic
        • 42892
        • 44 Posts
        Quote from: treigh at Feb 06, 2017, 05:27 PM
        Try this in your Weblink field:
        [[~##? ¶ma=`valuea` ¶mb=`valueb`]]
        // Where ## is the id of the target resource
        


        This should produce a URL with the following structure: http://b.example.com/site?parama=valuea¶mb=valueb

        Thats nice to know (for real, I didn't know that this works) but this is not realy a solution to my problem, rather then a step into the right direction for the non-Weblink solution.

        But thanks a lot smiley