I know there has to be a way to do this. I’m trying to use a snippet call as a snippet parameter. Here is my snippet call:
[[Ditto? &documents=`[!xref_doclist? &data=`[*xref_casestudies*]` !]` &tpl=`ditto_cs_logo` &randomize=`1` &display=`3`]]
The snippet "xref_casestudies’ is working when called by itself. It returns a comma-separated list of document ID’s (i.e. 36,70,73,126,50,48).
This snippet call results in a "Modx Parse Error.
I also tried saving the value to a placeholder, but it wouldn’t accept the ph as a parameter either.
What am I doing wrong?
Thanks
[*xref_casestudies*] is defined as a TV by having the [*xxxx*] fromat, a snippet would be [[xxxx]] (cached) or [!xxxx!] (uncached)
If [*xref_casestudies*] is actually a snippet of code then you’d want [[xref_casestudies]] so as to alternate between cached and uncached in a nested snippet call.
Thanks for the reply. The [*xref_casestudies*] tv is needed by the xref_doclist to return the comma-separated list of document ids.
Are you unable to nest a TV inside of a snippet call inside of another snippet call? Am I violating some ModX rule here?
Thanks for the help. I’m amazed at how quickly folks respond here.
Best regards!
CD
You are correct! Thank you. It works as expected now. The wiki showed an example of a nested snippet call, and I was following that example.
Thanks again!