We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 19388
    • 297 Posts
    I don’t know if there is something done in this way, and it will be great to have a MODx native tag storing URL parameters. Because I did not found something simmilar I did this really simple snippet that returns a specified get parameter.
    This is usefull to pass values to snippets.

    if(isset($_GET[$param])) return $_GET[$param];​


    Usage:
    Supose we want to show a specific user profile, using the Login.Profile snippet. We have to specify it manually, but this argument usually is sent but URL. Let’s do this:

    URL: http://www.mydomain.com/profile.html?username=JhonDoe

    Snippet call:

    [[!Profile? &user=`[[!returnGetParameter? &param=`username` ]]` &prefix=`user.`]]
    



    Mental note: Now is when someone tells me, dude! this was already done! hahaha
      • 4172
      • 5,888 Posts
      there are two for revo. One is getReqParam, the other one, I’m not sure, is getUrlParam or that like. Both are for Revo.
        -------------------------------

        you can buy me a beer, if you like MIGX

        http://webcmsolutions.de/migx.html

        Thanks!