I am trying to test snippets.
(I useMODX Revolution 2.2.0-pl2 (traditional))
I want to pass a variable to the snippet (first) and show it
and put the values of the TV into an array (Array [0] => 1 [1] => 2 [2] => 3 [3] => 4 ... )
template varialbe "subcategories":
1 2 3 4 5 6 7 8 9 10 11 13 14 15 16 17 18
call to snippet:
[[lijst? &first=`inhoud`]]
snippet
<?php
echo "the passed variable:".$first."
";
print_r(explode(" ","[[*subcategories]]"));
result on screen:
the passed variable:
Array ( [0] => 1 2 3 4 5 6 7 8 9 10 11 13 14 15 16 17 18 )
2 problems:
The $first variable is not shown.
and
the array is shown but does not explode correctly...
as this is basic functionality of modx revolution
I guess I am doing something wrong?
[ed. note: djemmers last edited this post 12 years, 2 months ago.]