We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 10313
    • 375 Posts
    Hello.

    Is there a way to comfortably access the $_REQUEST variable from within a template? My template is an external html file. I want to generate a link to a different page and want to give some parameters to the next page. These parameters are already present in $_REQUEST.

    Thx
    Martin
      • 22303 MODX Staff
      • 10,725 Posts
      Quote from: FuryDE at Sep 05, 2007, 08:27 AM

      Hello.

      Is there a way to comfortably access the $_REQUEST variable from within a template? My template is an external html file. I want to generate a link to a different page and want to give some parameters to the next page. These parameters are already present in $_REQUEST.

      Thx
      Martin

      A MODx snippet will have access to all PHP super-globals, according to the PHP-controlled configuration for GPC order; so just write a snippet and call it from your template.
        • 10313
        • 375 Posts
        Ah yes, that will do. But, I’m sorry for having forgotten to post that ... I just made an php file from my html and filled the link with php directly from within the template. But I see that in some cases it could be better to use a snippet instead.

        Thx
        Martin