I'm been kicking myself for hours and going round in circles trying to get list of entries displayed by category when the category is selected from within a SuperTable (static table) row. I would really appreciate if someone could please help point me in the right direction.
I have a structure entries section named "services" with a number of entries created. I have a category group named "serviceCategories" I have a "SuperTable" static table field handle named "service" In my SuperTable I have a row named "serviceCategory" which allows me to select a single category from the category group named "serviceCategories".
I'd like to create a standalone web page that displays all the category titles with the list of related entries.
I've tried:
{% set categories = craft.categories.group('serviceCategories') %}
{% for category in categories %}
{{ category.title }}
{% set services = craft.entries.section('services').relatedTo(
{ targetElement: row.serviceCategory }
) %}
{% for service in services %}
{{ service.title }}
{% endfor %}
{% endfor %}