Hey,
I’ve only recently started using snippets and I can’t seem to find any decent documentation on them. I’m currently working on DittoCal...I’ve changed it so uses the description variable instead of the createdon date so that I can have events that last several days and appear on more than one day of the calendar by just using a comma separated list of dates. I’m now trying to change it so that it works off a template variable, the problem is I don’t know how to access them inside a snippet. In this instance I really need them to appear in the JSON output. I’ve had a look at changing the JSON class and I can get it to output some more text, but again I hit the same problem of not knowing where template variables are stored within modx. I’ve seen a couple of examples hitting the database to get them, is this the only way is there something way more simplified along the lines of $modx->templatevars?
Of anyone knows of any good documents/guides on snippets that would also be ace.
Cheers,
Tom