The Blog Category Filter doesn’t work in October CMS

  laravel, octobercms

Recently I’ve just started testing October CMS.
As for starting point I’ve installed this theme

Really, I don’t know does a issue relates to this theme, but the problem is with a filterable blog categories.

I’ve created two blog categories: "Photos" and "Videos", I’ve created several posts and assigned them accordingly.
Featured images of two categories are displayed fine In ‘Home’ and ‘Blog’ pages but "Videos" category doesn’t appear at all in ‘Portfolio’ page.
If ‘All’ filter is active, the posts from second category are not displayed.
The same happens if I click on a "Videos" filter button – the blank page is shown. Posts are not loaded.

The section looks like:

<div class="portfolio-section">

    <ul class="portfolio-filter controls text-center">
        <li class="control" data-filter="all">All</li>
        {% for category in categories %}
        <li {% if category.slug == currentCategorySlug %} class="active control" {% endif %} data-filter=".{{ category.name }}">{{ category.name }}</li>
        {% endfor %}
    </ul>


    <div class="row portfolio-gallery m-0">
        {% for post in posts %}
        {% for image in post.featured_images %}
        {% for category in post.categories %}
        <div class="mix col-xl-2 col-md-3 col-sm-4 col-6 p-0 {{ category.name }}">
            <a href="{{ image.path }}" class="portfolio-item img-popup set-bg" data-setbg="{{ image.path }}"></a>
        </div>
        {% endfor %}
        {% endfor %}
        {% endfor %}
    </div>
</div>

Where is the problem and how it could be fixed?
Thank you!

Source: Laravel

Leave a Reply