Hi,
I try to do the simplest Ditto to teach myself Ditto.
So I like to generate a list of page titles from a container with documents. I created a chunk named ’menuIndex’ just having this:
[+pagetitle+]
And use ditto as follows:
[[Ditto?&parents=`17`&depth=`1`&tpl=`menuIndex`&display=`all`]]
But I get a MODX parse error:
Error: array_values() [function.array-values]: The argument should be an array
Error type/ Nr.: Warning - 2
File: /some/path/includes/document.parser.class.inc.php(748) : eval()’d code
Line: 372
Am I missing something? My approach too simple?
Thanks!
rnd
try putting a space between the ? and the & somtimes helps
Maybe something wrong with your Ditto. I just tried your exact call with the chunk and it worked like a charm.
Just a useless bit since this has been solved.. but on my Ditto calls, I never use the & after the ? never had a prob.
-
☆ A M B ☆
- 24,524 Posts
Snippet parameters are handled in the same way a URL query string is handled. The first option can immediately follow the ? with no white space, but all following options must have the &. Spaces are optional; the ` ` delimiters are also optional if there are no spaces in the option value. Best practice is [[SnippetName? &option=`value` &option=`value`]]