Quote from: sottwell at Aug 26, 2011, 02:06 AMYou can also use a wrapper snippet that calls your snippet with $modx->runSnippet('snippetName', array('param1'=>'value1','param2'=>'value2'); and the params and values can have whatever you like.
I hope it's not too late to post to this thread..
I'm not sure if I'm understanding this properly, but it looks as though the above allows arbitrary parameters to be passed into another snippet (which is useful to know), but only if the user is able to create this 'wrapper' snippet by themself? I presume this would still have the same problem with special characters (equals, ampersand, question mark, etc) if you tried to tried to pass them as normal snippet parameters in a call to
this snippet from a normal MODx page?
My particular problem is that I want to allow page authors to call a particular snippet in a page and pass as a parameter an HTML string (which will in this case include these special characters). Unfortunately, I can't expect my users to have sufficient technical knowledge to be able to correctly break down the HTML (which is widget 'embed code' generated by a third-party) into multiple parameters to be passed into the snippet individually, and nor do I want to give their user role the privileges to create new snippets as I can't expect them to have the knowledge to do this properly.
Is there any other way that I could have the users pass in an HTML string (other than the special character substitution previously suggested, which unfortunately also requires too much technical knowledge from my users regarding which characters they need to substitute)?
(I'm using MODx Evolution 1.0.6, by the way.)