This forum has moved to a new location and is in read-only mode. Please visit talk.octobercms.com to access the new location.
Chris
I have a blog post that has a featured image uploaded to it. I want to get the featured image and display it in the single view of the blog post.
This is the code tab section that I have.
$this['title'] = $this->components['blogPost']->post->title;
$this['subtitle'] = $this->components['blogPost']->post->sensit_blogsubtitle_subtitle;
$this['image'] = $this->components['blogPost']->post->content_images[0]['path'];
What is the best way to get the featured image?
Also how does featured image work? If I have 2 images:
0 => MyCoolImage
1 => AnotherCoolImage
And I delete the image with index 0 . Will the image with index 1 become the main image (t.e image with index 0 ) ?
Last updated
alex.migwi29876
This discussion helped me figure my way out. It may help you too.... https://octobercms.com/forum/post/rainlabblog-listing-posts-with-featured-image
1-2 of 2