The Necessity of Subcontent

By Deane Barker 5 min read
Author Description

The ability to organize content into trees consistent of parent-child relationshps is a core feature of content modeling, and resolves so many modeling patterns

AI Summary

This post argues that subcontent is crucial for effective communication. The author emphasizes its role in enhancing user experience, improving SEO, and organizing information, illustrating how well-structured subcontent can lead to better engagement and comprehension of the main content.

Here’s something I don’t see nearly enough in content management systems: subcontent. This is when a content object contains other content objects as children. I don’t think I’ve ever built a content-managed site where I haven’t (1) used this when it was available, or (2) wished for it when it wasn’t.

It’s so common for a conceptual object in a content model to be composed of other content. This mirrors a relational database – the most common relationship between tables in a database is a one-to-many relationship where one thing in one table is related to many things in another table.

The same concept is at work here. Having a set of content objects existing within another is like an implicit one-to-many relationship. The parent is related to many children, and all of the children are related to one parent.

Most content management systems have some form of content tree, but often they fall into the “folder trap,” where they use the folder-and-file metaphor from operating systems. You can create folders, which then contain content.

I maintain that this is a mistake for a very important reason: the folder is not a content object itself. It’s a folder – some arbitrary structure thought up by the architects of the CMS, and it can’t carry content-based data or be managed like content (subject to workflow, versioning, etc.).

In practice, a content tree should effectively be made up of nothing but content objects stacked on top of one another. There are no “folders,” unless you want to create a “folder-like” content object. Each node in the tree is a content object, which has a content object as a parent and can have multiple content objects as children.

I was recently working with a magazine publisher. We discussed their content model, and it worked out like this:

A publication has multiple issues which each have multiple sections which each have multiple articles which each may have multiple subarticles. It was both highly relational and purely hierarchical – a perfect example of the need for subcontent.

With subcontent, this is simple. You have a publication content object which contains multiple issue content objects, etc. Since the tree is made up of content itself, representing these relationships is trivial. An article belongs to the issue which is its parent. Relationships are derived from their position in the tree.

If not for subcontent, then I have to maintain an explicit reference in each content object to define what other object it belongs to. Far from the simplicity of just putting content somewhere, now I have to have a content selector interface widget to go find the parent piece of content. The user experience also suffers because a piece of content could be the “child” of something way across the tree. The concept of “parentage” suffers because the parent and the child are not “geographically” related in any way in the administration interface.

Additionally, referential integrity is tightened with subcontent. Since you can’t delete a parent without deleting all of its children, you ensure there are no orphan records floating around.

Why does this all make so much sense? Because it’s correct from an object oriented perspective, with which we’re all familiar. The Composite Pattern says that an object can contain another object. Using this, you put together complex programming objects to represent complex concepts. The same is true of content modeling – you start gluing together content to create more complicated content.

To really do this right, there are some best practices:

You can either make these limitations global, or build them into the permissions model. Maybe a normal editor can’t put a downloadable file under an article, but the webmaster can.

(For the record, you need to allow arbitrary ordering even if you’re using file-and-folder organization. Content often needs to be ordered in non-derivable ways. I’m convinced content management systems try to sweep this fact under the rug simply because the interface issues are a pain.)

Ideally, your content tree is not made up of actual content. Instead it’s made up of “nodes” which are then linked to content objects. What’s a node? Nothing, really – they’re just things you can stack on top of each other to make a tree. Each node has a link to a content object, and one of those links is the “main” link. (Why do you need a main node? See this post.)

Why do this? Because now a content object can exist in more than one place in the tree. This is because a node is linked to a content object, and multiple nodes can link to the same object. One location is considered the “main” location, but it can appear in hundreds of places, if you like. This just means that hundreds of nodes are linked to the same content object.

This is a very powerful content modeling feature, and it lets you model content as accurately as possible.

So, what system does the content tree right? Well, eZ publish, of course. I’ve also seen hints of this in Zope. Are there others? I’d like to know – comments are open.

Links to this – Varying Levels of Content Structure August 22, 2011
Content structure is achieved at a variety of levels -- structure within a property, structure withing a content object, structure between different content objects, etc.
Links to this – Five Tips to Getting a Good Response to a Content Management RFP July 28, 2011
The common patterns of writing RFPs is especially poor when it comes to content management. There are several specific things you can do to get better responses.
Links to this – My Obsession with Content Trees and Subcontent February 15, 2009
A discussion of how an obsession with a certain form of CMS architecture can make us blind to alternative forms.
Links to this – Chasing the Ideal: Relational Content Modeling in Content Management April 11, 2011
Every CMS tries, in some extent, to duplicate the classic model of the relational database. Some come closer than others to this "ideal."
Links to this – What Makes a Content Management System? June 30, 2007
Comprehensive post discussing the most common features found in content management systems today.
Links to this – Episerver's Custom Page Providers February 20, 2009
Discussion of an example of content aggregation, or the ability to raw in content from disparate sources and present it as part of a unified system.
Links to this – Grokking CMS November 21, 2016
Reflections on what it means to really understand a CMS, down to its bones.
Links to this – The Tortured Metaphor of Spatial Content Relativity January 4, 2017
We often try to force-fit content into physical metaphors, where it doesn't always fit.
Links to this – Is Content Geography Just Another Property? September 12, 2013
Reasons why content geography -- meaning the spatial relationship of content to other content -- is a proportionately more powerful way to model content then a simple, discrete content property.
Links to this – Uber-Text Pages and the Lack of Inheritance in Content Management April 21, 2008
In any CMS implementation, you invariably end up with a generic "text page" other, more structured, pages. What is the dividing line between these pages, and how could it be more effectively handled?
Links from this – The Content Tree August 18, 2005
A while back , I mentioned the concept of a “content tree” in regards to content management. I cited this as a “functional pattern” and promised to talk about it more, but I never did. So, here goes – With every content management system (CMS) I’ve written, I always get back to the concept of a...
Links from this – Of Taxonomies and Crumbtrails August 15, 2004
When content can be assigned to more than one taxonomy node presents a logical crumbtrail issue.