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

    I want to do a simple thing:

    on the start page index.php i have 2 links generated by me:
    index.php?beratung=on
    index.php?beratung=off

    I made a snippet called "menu" with the following content:
    <?php
    echo $_GET["beratung"];
    ?>

    In my standard template I included the snipped:
    [[menu]]

    Then I started the page in the browser. I didn’t klick on any link and there is already an output: "on"
    when i click on the other link, the output also doenst change to off.

    any ideas?

    thx, greetings, bernd

      • 36416
      • 589 Posts
      Quote from: berndi at Oct 31, 2008, 09:40 AM

      In my standard template I included the snipped:
      [[menu]]

      You will probably need to call it uncached:
      [!menu!]
        • 3749
        • 24,544 Posts
        MODx uses index.php to route all requests for pages on the site so you generally don’t want to be messing with the index.php URL.

        You could set a $_SESSION variable instead.

        Maybe if you told us more about what you’re trying to do and why we could suggest other alternatives. Have you looked at the Wayfinder snippet for creating your menu?

          Did I help you? Buy me a beer
          Get my Book: MODX:The Official Guide
          MODX info for everyone: http://bobsguides.com/modx.html
          My MODX Extras
          Bob's Guides is now hosted at A2 MODX Hosting
          • 36702
          • 76 Posts
          You could also try changing the links to
          [~[*id*]~]?beratung=on
          [~[*id*]~]?beratung=off
          then it should pass the parameter to the current page.