Hi there,
sorry for asking such a dump newbie question. I am trying to create a really simple minimal blog. How I can load image(s) from a template blog-post in my home.php? I am able to print fields e.g. titles, body, however images won't show up. Also image scaling doesn't work. The Field: images is set to "array if items".
I really appreciate any reply.
<!-- /.Load image from blog-blog template -->
<?php $blogposts = $pages->find("template=blog-post");
foreach($blogposts as $blogpost){
$blogimages = $blogpost->images;
$imgthumb = $blogimages->size(500, 300);
echo "<img src='{$imgthumb->url}' alt='{$imgthumb->description}'>";
echo "<h2><a href='{$blogpost->url}' >{$blogpost->title}</a></h2>";
echo "<p>{$blogpost->body}</p>";
echo "<br>";
}
?>