{% assign categories_uuids = "" %} {% assign categories_names = "" %} {% for course in courses.in_catalog %} {% if course.categories.size > 0 and course.ribbon == "VIDEO" %} {% assign course_categories_ids = course.categories | map: 'id' | join: "|||" %} {% assign course_categories_names = course.categories | map: 'name' | join: "|||" %} {% assign categories_uuids = categories_uuids | append: course_categories_ids | append: "|||" %} {% assign categories_names = categories_names | append: course_categories_names | append: "|||" %} {% endif %} {% endfor %} {% assign categories_uuids = categories_uuids | split: "|||" | uniq %} {% assign categories_names = categories_names | split: "|||" | uniq %}
{% include "video_filter", uuids: categories_uuids, names: categories_names %} {% for x in (1..categories_uuids.size) %} {% assign number_of_videos = 0 %} {% assign y = x | minus: 1 %} {% assign category_uuid = categories_uuids | slice: y %}

{{ categories_names | slice: y }}

Show less View all
{% for course in courses.in_catalog %} {% assign course_categories = course.categories | map: 'id' %} {% if course.ribbon == "VIDEO" %} {% for cat in course_categories %} {% if category_uuid contains cat %} {% assign number_of_videos = number_of_videos | plus: 1 %} {% include "cards_video" %} {% endif %} {% endfor %} {% endif %} {% endfor %}
{% if number_of_videos <= 3 %} {% endif %} {% endfor %}