-
☆ A M B ☆
- 24,524 Posts
What is the target URL of your AJAX call?
I would have one snippet with as many functions as necessary to return each desired output, and it would accept arguments from the AJAX request to determine which function to run (using a PHP switch construct). That way you'd only need one resource to be the target URL, and MODX would take care of everything. No need for multiple chunks (unless you want to use them as mini-tpls for the output of each function) or multiple snippets.
The function library could even be a separate .php file that gets included by the main snippet.
-
☆ A M B ☆
- 24,524 Posts
Ah. I use migxMultiLang, so I only have one resource for each language; it uses TVs for the translated fields.
-
☆ A M B ☆
- 24,524 Posts