Show thumbnail in the blog post - HELP PLZ
Permalink Browser Info Environment
Hi Chad and all you other smart people, i came across a problem and need some help.
Is it possible to show the thumbnail in the post? I need to be able to specify a width for the images posted with the blog and as far as i can see this is only possible if i use thumbnails. So if i dont want HUGE images messing up the blogpost i need the thumbnail image showed inside the post and not only in the front end of the post.
Hope someone can help me out with this.
Thank you
Is it possible to show the thumbnail in the post? I need to be able to specify a width for the images posted with the blog and as far as i can see this is only possible if i use thumbnails. So if i dont want HUGE images messing up the blogpost i need the thumbnail image showed inside the post and not only in the front end of the post.
Hope someone can help me out with this.
Thank you
Type: | Discussion |
---|---|
Status: | In Progress |
Greetings C5 users,
For support, please direct all questions and issue to the products "support" area.
For pre-sales, please direct your questions to the products "pre-sales" area.
Thanks again for being a ChadStrat product supporter.
Blessings,
ChadStrat
For support, please direct all questions and issue to the products "support" area.
For pre-sales, please direct your questions to the products "pre-sales" area.
Thanks again for being a ChadStrat product supporter.
Blessings,
ChadStrat
You can use this code in the pb_post.php page type to pull the thumbnail into use.
<img src="<?php echo ($c->getAttribute('thumbnail')->getVersion()->getRelativePath());?>" >
I was looking for something similar. Got things working by adding a file link instead of an image and then replacing the filename with the image I want.
This line of code works great but only when there the user has chosen to add a thumbnail to the post. If there is no thumbnail, it breaks the page. To get round this I used this...
<?php if($c->getAttribute('thumbnail')){ echo '<img src="'.($c->getAttribute('thumbnail')->getVersion()->getRelativePath()).'">'; } else { } ?>
A word of caution on this: if your posts are image heavy, you will want to make sure that your blog lists are pulling the page "description" and not using the content. Otherwise those images will show up in the blog list as well.
ChadStrat