Using thumnails in a pagelist

Permalink 1 user found helpful
Hi,

I would like to add different size images in to my page list.

currently i am using this
$img = $page->getAttribute('image1');
$imgThum = $page->getAttribute('image1');
$sliderimage = $ih->getThumbnail($img,1070, 9999, false); 
$sliderthumbnails = $ih->getThumbnail($img, 120, 9999, false);

but i want to be able to pull in the attribute image and then use concrete5's thumbnails that are generated. I have one called "sliderimage" and "sliderthumbnails" set up already

Any ideas?

TMDesigns
 
TMDesigns replied on at Permalink Best Answer Reply
TMDesigns
And the answer is

// fetch the file/image page attribute
            $img1 = $page->getAttribute('image1');
            // check if file object returned
            if (is_object($img1)) {
               // fetch specific thumbnail version from file, passing in handle of thumbnail type
               $src = $img1->getThumbnailURL('sliderimage');
               // output image tag
               echo '<img src="'. $src . '" />';
            }


http://www.mesuva.com.au/blog/concrete5/using-concrete57s-thumbnail...