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

    I am currently working on a module and have most of the code sorted now - but I would like to set a link to return to the module itself and I don’t want to use the javascript history method. I have read that I can set a ’module configuration’ to give me a variable with the module ID in it (http://www.sottwell.com/create-module.html), but nowhere in the article or the files did it show how to use that variable within the module script ?

    Does anyone know ?

    Regards,

    mm
      • 28042 ☆ A M B ☆
      • 24,524 Posts
      You have to have a full link, as you see when you hover over the module whether to edit it or to run it. To run the same module, as in the action attributed of a form, you would use "index.php?a=112&id=$moduleId". 112 is the action for running a module (see the manager/index.php file for all the possible actions).
        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
        • 19909
        • 49 Posts
        Thanks for the info, will be used and abused wink
          • 28042 ☆ A M B ☆
          • 24,524 Posts
          That’s the whole purpose of MODx grin grin Please do fold, spindle and mutilate - then share!
            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