#96

Product support

Visit this product's website for support.

Categories

  • Utility

Featured images extends the RainLab.Blog plugin with a possibility to upload featured images to every blog category.

Requirements

Installation

First you have to make sure you have added the RainLab.Blog plugin to your project. Then add the Ribsousa.Featuredimages plugin. Now you'll find a file field in the Blog Category when you add or edit a Category.

How to use it in a blog post or category page

To view your featured images you find them by adding .featured_images to your category-object, just like you would on your featured_images. As an example:

{% for category in post.categories %} {# loop blog post.categories #}
    {% if category.featured_images.count %} {# check to see if your category have any images #}
        {% for image in category.featured_images %} {# loop category.featured_images display images #}
            <img src="{{ image.path }}" alt="{{ image.file_name }}" />
        {% endfor %}
    {% endif %}
{% endfor %}

That's all, folks!

1.0.1

First version of Featuredimages

Feb 28, 2017