page list thumbnail
I need a pagelist thumbnail template done. i am using thumbnail template add on.
in the page list view with all the thumbnails of my pages - when the user clicks on a thumnbailimage - it takes him/her to a popup of a larger image.
When the user click on the Title it takes him to the desired page.
so i guess the a href for image goes to a popup
a href for h2 title goes to the page
any thoughts ? does this sound possible ?
Ok I don't know if this is exactly what you are looking for but it worked for me. I was working on a page list with thumbnails today and it took me a while to figure it out. I was adding a page list of blog_entry and they were not showing the thumbnails.
So what I did is I added an Image attribute to the page type and named the handler "thumbnail".(see 1st image) Then I added that attribute to the composer of that page type.(see 2nd image )
Then I had to modify the page list block in the concrete folder.\\concrete\blocks\page_list . Open view.php and you will see some code there that actually explains to you how to put thumbnails in the page lists. Why this isn't package with the default setup , is beyond me. Here is the instructions I found in view.php
* HOW TO USE IMAGE ATTRIBUTES: * 1) Uncomment the "$ih = Loader::helper('image');" line up top. * 2) Put in some code here like the following 2 lines: * $img = $page->getAttribute('example_image_attribute_handle'); * $thumb = $ih->getThumbnail($img, 64, 9999, false); * (Replace "64" with max width, "9999" with max height. The "9999" effectively means "no maximum size" for that particular dimension.) * (Change the last argument from false to true if you want thumbnails cropped.) * 3) Output the image tag below like this: * <img src="<?php echo $thumb->src ?>" width="<?php echo $thumb->width ?>" height="<?php echo $thumb->height ?>" alt="" /> * * ~OR~ IF YOU DO NOT WANT IMAGES TO BE RESIZED: * 1) Put in some code here like the following 2 lines: * $img_src = $img->getRelativePath(); * list($img_width, $img_height) = getimagesize($img->getPath()); * 2) Output the image tag below like this:
So follow those steps and now when you write in composer , choose your thumbnail and that's it , now you have page lists with thumbnails. You can change the HTML in the view.php file so that you page lists looks the way you want it. I didn't change anything and this is how mine looks ( image 4 )
Glad it helped , cheers!
Also, you cannot assume that people will have those image attributes on their pages so I think that's the reasoning behind not having it enabled by default.
But I agree with you that it's extremely useful, which is why I put all that stuff in there.