I have a structure for different categories like salad, soup, main course and so on. Basically they share the same fields - but I want to be able to have dynamic singles based on those structures. For example I have a MainMenu-Single where I than can select entries from salads, soups, main courses and so on.
But is there a way to loop through all the fields in that single?
I tried:
{% for category in craft.entries.section('foodMenuCategories') %}
{% if entry.{category} is defined %}
...
Sadly that doesn't work.
{% if entry.category is defined %}
– AbbeyDesign Sep 17 '14 at 13:16{% if entry.soup is defined %}
{% if entry.salad is defined %}
{% if entry.mainCourse is defined %}
and so on – maxx Sep 17 '14 at 13:20