Content Modeling

The common content types, already modelled

A collection binds a schema to a folder of content. Total CMS ships the schemas most sites need, so the standard collections exist a click after installation.

Content in Total CMS lives in collections, and a collection is a schema plus a folder. The schema decides what an object looks like; the collection decides where it lives, what it is called in the admin, how it sorts, and what URL its objects appear at. Total CMS ships the schemas most sites need: blog, image, gallery, file, depot, text, styledtext, number, date, toggle, color, url, email, svg and feed, with podcast and podcast-episode for shows.

A new install ships no content collections — you pick what you need. The fastest route is Project Setup on the dashboard: Setup Default Collections creates the standard set, blog, gallery, image, video, file and the rest, each wired to its matching schema. From there, adding a post is a form and a Save, and the record lands on disk as a JSON file named after its id.

Each collection then carries its own settings, and they are what make a generic schema feel bespoke. labelSingular and labelPlural rename the buttons and headings, so a client sees “New Case Study” rather than “New Object”. category groups collections in the sidebar. sortBy and reverseSort set the default order of the list — a blog usually wants date, newest first. singleton marks a collection as holding exactly one record, which is the right shape for a homepage or a settings object.

The url setting tells the CMS where objects appear on the public site, and with prettyUrl enabled a post resolves to /blog/my-post instead of a query string. That one setting feeds object links in Twig, RSS feeds and sitemap generation, and it is what lets Site Builder route a request for /blog/my-post straight to the record.

You can also reshape a built-in schema per collection without touching the schema itself. The properties override changes a field's label, help text, placeholder, field type, options or settings for this collection only; customProperties narrows that further, to a single object by id. So the shipped text schema can present itself as a plain textarea in one collection, a rich-text field in another, and a select of fixed options in a third. Note that the blog, depot and podcast schemas require Standard edition or above.

What you get

The standard set in one click

Project Setup → Setup Default Collections creates blog, gallery, image, video, file and the rest, each bound to its matching schema.

Named in your client's words

labelSingular and labelPlural rename every button, heading and confirmation. category groups related collections in the sidebar.

One record when that is the truth

Mark a collection as a singleton and clicking it opens its single object directly — no one-row list, no way to add a second.

URLs the CMS knows about

Set a collection's url and turn on prettyUrl and objects resolve to /blog/my-post — used by object links, feeds, sitemaps and the page router alike.

Override without forking

Per-collection property overrides change a field's label, help, type or options, and customProperties can do it for a single object by id.

In practice

One snippet

{% for post in cms.collection.objects('blog') %}
	<article>
		<h2>{{ post.title }}</h2>
		<p><small>{{ post.date | date('F j, Y') }}</small></p>
		<div>{{ post.summary }}</div>
	</article>
{% endfor %}

A built-in schema needs no setup to render — the collection is already there to loop over.

FAQ

Common questions

Which content types ship with Total CMS?

Blog, image, gallery, file, depot, text, styledtext, number, date, toggle, color, url, email, svg and feed, plus podcast and podcast-episode for shows. The blog, depot and podcast schemas require Standard edition or above.

Do I need custom schemas to build a site?

No. Many sites run entirely on the built-in schemas, reshaped per collection with label and property overrides. Custom schemas are for genuinely new object shapes, and are a Pro feature.

Can two collections share one schema?

Yes. The schema defines the shape; the collection defines the name, URL, sort order and overrides. Several collections can bind to the same schema and present themselves quite differently.

How do I get clean URLs for objects?

Set the collection's url to the path the content lives at and enable prettyUrl. Object links then resolve to /blog/my-post rather than a query string.