Thumbnail acting as the main photo
Permalink Browser Info Environment
I am converting and remodelling my actual site, http://www.guyverville.com, made with Textpattern, into Concrete 5, http://dev-guyverville.com/blog... . In Textpattern, it is fairly easy to associate an image to an article. Both the original photo and thumbnail are process automatically (thumbnails and full sizes are attributes of the same photo. A similar process is available also in Drupal).
With Pro Blog, I have the possibility to associate the thumbnail, but I have not figure out yet how to show this image in full size on the blog item itself apart from replacing the image manually.
Is this process can be automated?
With Pro Blog, I have the possibility to associate the thumbnail, but I have not figure out yet how to show this image in full size on the blog item itself apart from replacing the image manually.
Is this process can be automated?
Type: | Discussion |
---|---|
Status: | New |
Well, it would be fine to have just a function to get it. Perhaps I can tweak the view.php.
I have succeeded. I copied the blog_post.php file into the blocks folder of the site, and tweeked it. Copied the code from the problog_list's view.php and getting rid of the limitation of the thumbnail settings, giving here the width I wanted.
$imgHelper = Loader::helper('image'); $thumb = $c->getAttribute('thumbnail'); if ($thumb) { $image = '<img src="'.$imgHelper->getThumbnail($thumb, '640px', 'auto')->src.'" />'; echo $image; } //$thumb
Hi ChadStrat,
I thought I had resolved my problem, but it had created another one. Since I have copied your /content/templates/blog_post/view.php, the content of newly blogs are not shown.
I suspect it is due to the $controller->getContent() line. When I remove the view.php file, everything is back to normal, but to the lost of my modifications.
Can you help me understand what it is involved here?
Thanks in advance.
I thought I had resolved my problem, but it had created another one. Since I have copied your /content/templates/blog_post/view.php, the content of newly blogs are not shown.
I suspect it is due to the $controller->getContent() line. When I remove the view.php file, everything is back to normal, but to the lost of my modifications.
Can you help me understand what it is involved here?
Thanks in advance.
Please disregard the last statement. It was a Code 18 problem...
This is because many times, users want a different size image in the preview than what is in the content post.
ChadStrat