Hi,
This is probably a very stupid question, but I’m currently trying to call a snippet from a chunk and I’m having some problems.
I’ve tried calling it like this:
[!runSnippet(’tax’), [+net_price+]!]
and like this:
[[runSnippet(’tax’), [+net_price+]]]
where [+net_price+] is a variable I want to pass it.
It goes to a very simple snippet that should print out test on the webpage, but currently isn’t.
Any help would be appreciated!
Thanks
Hollie
-
☆ A M B ☆
- 24,524 Posts
I presume you’re using Evolution (1.0.4)
Snippet parameters take the form
[!snippetname? ¶mname1=`value1` ¶mname2=`value2`!]
Note that those are backticks, not single-quotes or apostrophes.
http://sottwell.com/how-snippets-work.html
Hi,
I tried this, putting in the following:
[!tax!]
and then I tried,
[!tax?!]
and then lastly,
[!tax? ¶mname1=`[+price_net+]`!]
but both caused the following syntax error:
SQL Query error: INSERT INTO `modxshop`.`xshop_event_log` (eventid,type,createdon,source,description,user) VALUES(1,3,1289493853,’tax - Snippet’,’syntax error, unexpected \’[\’
These are the only square brackets on the page - so I’m a little confused. If I was calling a snippet without parameters, would I do it as shown in the first example, or am I making another mistake there?
Thanks again!
Hollie
Managed to solve it sorry! The error was coming from my snippet - so thank you Susan for your help!
:)