Page List with image thumbnail?

Permalink 1 user found helpful
Is there anyway with the current version to make page lists pull an image off the page they link to and use it as a thumbnail that appears next to the page list, ideally clickable ?

artisancreative
 
Remo replied on at Permalink Reply
Remo
this is fairly easy if you have basic php skills..

1. add a page attribute (image) to the page type you're working with
2. create a custom page_list template and fetch that attribute
Remo replied on at Permalink Reply
Remo
not sure if this help, it's written in german, but here's a tutorial about it..

http://www.codeblog.ch/2009/03/concrete5-templates/...
artisancreative replied on at Permalink Reply
artisancreative
thats what I'm after, will have to see if a translator can make this more readable!

Thanks
Remo replied on at Permalink Reply
Remo
I'm actually thinking about writing English tutorials. They would probably have a few mistakes but they should still be readable..

I'm currently looking for a multi language wordpress plugin. xLanguage seemed to be nice but it's a bit tricky to write articles with it..
artisancreative replied on at Permalink Reply
artisancreative
At least the code doesn't care what language you speak!

I can probably work my way through it with a google translation
Dutchwave replied on at Permalink Reply
Dutchwave
Added a little if statement, for if there is no picture to display.

<?php if($cobj->getAttribute('news_thumbnail')) { ?>
      <div class="ccm-page-list-thumbnail">
      <img src="<?php echo $cobj->getAttribute('news_thumbnail')->getFileRelativePath() ?>" alt="<?php echo $title ?>"/>
   </div><?php  
   } 
   ?>


Would be nice to add a auto-thumbnailer to it.
Remo replied on at Permalink Reply
Remo
you can already do that

the file object you're working with has a method called getThumbnail($width,$height) and returns an object with has an attribute called src...
echo it and you're finished!
Dutchwave replied on at Permalink Reply
Dutchwave
Can I find an example somewhere?

thanks
Remo replied on at Permalink Reply
Remo
check my tutorial -http://www.codeblog.ch/2009/03/concrete5-templates/...

I added a second template on the second page after you mentioned it.. thought it's a good idea and added it!
Dutchwave replied on at Permalink Reply
Dutchwave
Would be nice to show a (main)image from the Content area.

The other way around would work I suppose. Offcourse not loading the image in the content area, but next to it. With CSS make it look like it's one element.
melat0nin replied on at Permalink Reply
melat0nin
Is this a possibility? It would be great if clients could insert an image in a content block and it was automatically used as the thumbnail in a pagelist..
ijessup replied on at Permalink Reply
ijessup
would be to have the page list grab the first <img> tag on the page.

That way you could use it on existing pages that don't have the image attribute, and you wouldn't have to add an image to every new page.

However, the problem would be that you couldn't select a specific image for that page if you wanted something other than the first image.