I have this snippet (I want to get elements from .xml file):
$movies = simplexml_load_file('http://www.example.com/example.xml');
$out = "";
foreach ($movies as $movie) {
$properties = array(
'photo' => $movie->image,
'title' => $movie->title,
'desc' => $movie->teaser,
'channel' => $movie->channel,
'date' => $movie->date);
$out .= $modx->getChunk('tpl_movies-item', $properties);
}
return $out;
And chunk tpl_movies-item:
<article>
[[+photo]]
[[+title]]
[[+desc]]
[[+date]]
[[+channel]]
aaa
</article>
It shows only "aaa" (but when I add "echo $properties['photo']" it prints right value), when I change values in array to strings, eg. 'desc' => "lololololol" it works right. Could u help me what should I do?