Categories or Channels?
Note: This post is a revised version of one that was on the now-defunct ExpressionEngine Wiki. The original version is still viewable in the Wayback Machine.
So you’re building a new EE site, and trying to decide how to structure the backend of ExpressionEngine. EE has all these…things…to hold content. Where to start? While this post is not an all-inclusive tutorial one of the most basic questions is should you:
- Use one channel to hold all “pages” and then use categories to organize them into the desired hierarchy?
- Split up the site content into multiple channels and handle the heirachy in another way?
There is no “best practice” here. Sometimes categories will work fine, other times channels are more flexible.
In general there are a few questions you can ask to help determine a build approach:
Will your site have different types of content?
Different types of content will require different fields setup to store that content (think about FAQ vs.Products or a timeline and the different bits of content that would make up each one).
ExpressionEngine’s channel fields are the heart of the CMS - they are both inherently flexible and extensible using 3rd party add-ons. While categories offer custom fields they are more limited in nature and not extensible using 3rd party add-ons.
One channel can only have one field group assigned to it so it’s usually best if you break up different content types into their own channels.
Will you need for different members to have different access to the sections?
If you will have multiple content editors managing your site and you want to restrict them to only post in certain areas then you will probably want to use channels for the main sections.
In ExpressionEngine’s member management you can be very granular with permissions to Channels. Categories not so much. There are permissions at the Category Group level but not at the individual category level.
Will each section need distinct categories itself?
Each Channel can be assigned its own set of Categories. These groups can have unlimited number of and levels of subcategories.
A single Channel may also be assigned multiple Category Groups. This can be used to create heirarchy in entries or pull entries from multiple channels using a shared Category.
Will your sections need distinct front-end templates?
While it is possible to use distinct templates for sections if you’ve organized your site using Categories, it’s far easier using multiple Channels with matching Templates/Template Groups.