Thumbnail to block Page List ?
Permalink
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
$val = $cobj->getCollectionAttributeValue('thumbnail'); $imgHelper = Loader::helper('image'); $thumb = $imgHelper->getThumbnail($val, 100,100); echo $thumb->src;
<?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);
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?