ProBlog

A powerful October CMS Blog plugin. Boost your SEO with robust blogging tools by Radiantweb.

Back to ProBlog Support

kent1244
kent1244

It would be great if I uploaded four featured images, then the first image is on the BlogList page, and the other featured images is under the post/first featured image.

Possible?

ChadStrat
ChadStrat

Certainly possible. If you look at the views, you should see {% if post.featured_images[0]['path'] %} you could easily make this an array loop instead of grabbing only the first one [0]. Here is the twig documentation on the "for" statement. http://twig.sensiolabs.org/doc/tags/for.html

So I think that would be {% for image in post.featured_images %} {% set path = image['path'] %}{% endfor %}

The bloglist component view uses 'post.featured_images', and the post component view uses 'post_item.featured_images' fyi.

ChadStrat

kent1244
kent1244

Works great! But how would img src="{{post_item.featured_images[0]['path']}}" alt="blogpost{{post_item.id}}" width="100%" / be looking... I see that I have some Twig documentation to read :)

Last updated

1-3 of 3