We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 29123
    • 1 Posts
    I am still learning how to use these templates so maybe some one can help me.

    I have a Template Variable pointing to a Snippet. The TV is in my Template. However, I do not want the TV to run on every page. Is there a simple way that I could say (if Menu Index = X skip the TV, else call the TV)??

    Thanks,
    Louis
      • 7923
      • 4,213 Posts
      you can do the iffing in the TV by using @EVAL binding to decide if the snippet should be run or not.. like use

      @EVAL if ($modx->documentIdentifier == 69) { $modx->runSnippet("snippetname", array("param1" => "value1", "param2" => "value2")); }

      for example as the TV value.. Or you could do separate templates, one with the TV and one without..

      btw, are you and opengeek related? from the famous geek family


        "He can have a lollipop any time he wants to. That's what it means to be a programmer."