Thumbnail to block Page List ?

Permalink
How can I hang thumbnail to block Page List. what I need to generate is a list containing Thumbnail, Title and Description in Concrete5.3.1.

vemido
 
Remo replied on at Permalink Reply
Remo
vemido replied on at Permalink Reply
vemido
Many thanks Remo
chassa2556 replied on at Permalink Reply
chassa2556
The tutorial above doesn't seem to work in 5.3.1 I can't seem to get the thumbnail to load from this tutorial. Is there an update for the latest version?

This is the code I'm using for the custom template page. But when I set this in my news page as an atribute it doesn't show the picture 'thumbnail' i've specified.

<?php 
defined('C5_EXECUTE') or die(_("Access Denied."));
$textHelper = Loader::helper("text"); 
// now that we're in the specialized content file for this block type, 
// we'll include this block type's class, and pass the block to it, and get
// the content
if (count($cArray) > 0) { ?>
<div class="ccm-page-list">
<?php 
for ($i = 0; $i < count($cArray); $i++ ) {
   $cobj = $cArray[$i]; 
   $title = $cobj->getCollectionName(); ?>
<h3><a href="<?php echo $nh->getLinkToCollection($cobj)?>"><?php echo $title?></a></h3>
<div class="ccm-page-list-description">
   <?php if($cobj->getAttribute('thumbnail')): ?>
frz replied on at Permalink Reply
frz
wouldn't shock me if it was a 5.3.2 specific solution.... 5.3.3 isn't far away.

-frz
matogertel replied on at Permalink Reply
matogertel
Try something like:
$val = $cobj->getCollectionAttributeValue('thumbnail');
$imgHelper = Loader::helper('image');
$thumb = $imgHelper->getThumbnail($val, 100,100);
echo $thumb->src;
chassa2556 replied on at Permalink Reply
chassa2556
Sorry I'm a bit of a newbie - where does this go could you please add this to the code block I've posted in the right place please. I still can't get it to work....
matogertel replied on at Permalink Reply
matogertel
<?php 
defined('C5_EXECUTE') or die(_("Access Denied."));
$textHelper = Loader::helper("text"); 
$imgHelper = Loader::helper('image');
// now that we're in the specialized content file for this block type, 
// we'll include this block type's class, and pass the block to it, and get
// the content
if (count($cArray) > 0) { ?>
<div class="ccm-page-list">
<?php 
for ($i = 0; $i < count($cArray); $i++ ) {
    $cobj = $cArray[$i]; 
    $title = $cobj->getCollectionName();
    $thumb = $cobj->getCollectionAttributeValue('thumbnail');
   if ($thumb) $thumb = $imgHelper->getThumbnail($thumb, 100,100);
chassa2556 replied on at Permalink Reply
chassa2556
Thanks for posting this matogertel but have put it in my custom template News.php and specified it in my news page but its still not calling in the thumb. Have followed the tutorial above to the letter and then put in your code for the template.

http://www.psychotherapy-brighton.com/cms/index.php?cID=68...

What I'd really like to do is have different thumbs for each news story and then there being a full pic on the next page and the full story. A bit like a news page. Any ideas?