We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 41395
    • 8 Posts
    I looked up the code for passing a template variable to a snippet and from previous forum threads it looks like the format is:

    [[snippet_name? &parameter=`[*template_variable*]` ]]
    


    However, that does not work for me. In my case, the snippet name is format_price and the template variable is product_price:

    [[format_price? &valuein=`[*product_price*]` ]]
    


    In my snippet at this point, all I am trying to do is return the value that was passed in. If that works, then I can figure out the formatting.


    My snippet. Pretty basic.
    <?php
    
    return $valuein;
    


    What is getting rendered on my page is [*product_price*] rather than the value that was passed in. It is as if the whole thing is being treated as a string rather than getting translated into the value.

    Any help would be appreciated.
      • 22427
      • 793 Posts
      May be you are using Revo?
      Then you have to change the Evo syntax [*product_price*] to the Revo syntax
      [[*product_price]]
        • 41395
        • 8 Posts
        Yes! That was it. Wow, thanks a lot. Maybe they need to clarify their documentation a little bit because there was no mention of the syntax being tied to Evo instead of Revo.
          • 22427
          • 793 Posts
          For the changes of the syntax of tags see here:
          http://rtfm.modx.com/display/revolution20/Tag+Syntax