Sorry for the very basic question, I have looked here and tried to find an answer but I had no luck.
Basically I would like to output the first image for each 'item' featured (they all have an image field titled 'images' in the standard way).
So, my code so far is:
<?php
$features = $pages->find("featured=1, limit=5, sort=-date");
foreach($features as $feature) {
echo "<li>" .
"<h3><a href='{$feature->url}'>{$feature->title}</a></h3>" .
"<em>{$feature->date}</em>" .
"<p>{$feature->intro}</p>" .
"</li>";
}
?>
Would anybody be able to help me to ouput the first image from the images field for each of these?
Again, sorry for such a basic question.
I am so impressed with Processwire, I have used it for 4 sites now and would return again and again. There's nothing that comes close out there.
Thanks,
Jon













