To help understanding Jason reply, check this code below.
// combine template and document variables
$source = $this->mergeDocumentContent($source);
// replace settings referenced in document
$source = $this->mergeSettingsContent($source);
// replace HTMLSnippets in document
$source = $this->mergeChunkContent($source);
// find and merge snippets
$source = $this->evalSnippets($source);
// find and replace Placeholders (must be parsed last) - Added by Raymond
$source = $this->mergePlaceholderContent($source);
That’s the order of how MODx parser parsed all the corresponding tag. If you use document content/chunk/setting variables inside a snippet calling as a parameter for that specific snipet, than it’s theoritically will work. It all depends on the order of which one will be parsed first. In this case all document content, chunk, and setting variables will be parsed first before parsing snippet. So basically by the time the parser try o parse the snippet tag, all the previous chunk, document content, and template variables had been parsed before hand and substitued with the right value, so it will work.
Example usage that work
[[snippet_name? ¶m=`[*tv_name*]`]]
[[snippet_name? ¶m=`{{chunk_name}}`]]
{{[*tv_name*]}}
Example usage that won’t work
{{[[snippet_name]]}}
[*[[snippet_name]]*]
Another thing to note, when combining 2 snippets calling. If you use the uncached format [!snippet_name!], it will always being parsed the last. So if you have:
[!snippet_last? ¶m=`[[snippet_param_name]]`!]
It will works just fine.
In fact, you can use it like this.
[!snippet_last? &{{chunk_param_name}}=`[[snippet_param_name]]`!]
or
[!snippet_last? [[snippet_that_generate_dynamic_param]]!]
Hope it does help some of you guys without confusing you guys more about MODx parser