I've got a section called 'web development' and there are four categories that apply to it. Three can be grouped together as 'original content' and one is a link list to external third party content.
I'd like to split my entry archive list such that one group lists all entries in the Web Development section that don't belong to the 'external' category (there will only ever be one 'external' category, but I may make new categories that apply to 'original content' so I don't want to hard-code the categories).
After that I'd like to loop through again but only listing entries that do belong to that 'external' category. For each entry I'd like to spit out which category it belongs to as well as the entry title and date.
I can't wrap my head around how to do this, I'm not sure I'm groking how to use relations. Or would I be better to create nested categories rather than trying to group them 'after the fact'?
EDIT: went with making categories and sub categories, but still can't get things to work!
{% set originalContentCategory = craft.categories.slug('original-content').find() %}
{% set originalContentCategories = craft.categories.group('global').descendantOf(originalContentCategory).find() %}
{% for category in originalContentCategories %}
<h3>{{ category.title }}</h3>
{{ category.synopsis }}
{% endfor %}
This is listing all categories in the group, including the 'original-content' category itself. What am I doing wrong?
find()
withfirst()
to save one category in youroriginalContentCategory
var instead of an array.