Hey guys, so it’s been a long time and my skill with ModX has grown dramatically (to the point that I can actually post in this part of the forum

!) However, I’m running into a problem right now and I can’t figure it out.
So, in trying to make myself a jquery slider for a site, I realizetod I would have to list all the images from a certain in li blocks (how the script I downloaded works). Right now, I have the js in a chunk linking into [[getPics? &id=`[[+pagetitle]]`]] in between the ul blocks. Here’s the script for getPics:
<?php
$source = '/images/' . $id;
$pics = scandir($source);
$count = 0;
foreach($pics as $pic) {
$output[$count] = modx->getChunk('picTpl',array('file'=>$pic));
$count++;
$content() .= $output[$count];
};
return $content;
?>
Now for some reason whenever I try and go the test page I put the chunk into, it says "Parse error: syntax error, unexpected T_OBJECT_OPERATOR in /home2/djharryr/public_html/core/cache/elements/modsnippet/7.include.cache.php on line 11"
I have no idea why, and am quite confused. Any help would be appreciated
Also, I realize I went about some of this in a really convoluted manner so if you want to critique the code (as harshly as you wish) it would also be a great learning experience!
Thanks,
Alex