What's the purpose of content modelling
- Helps content writers know how to write
- Designs the CMS
- Establishes the data models for back-end development
- Guides front-end developers in how to write semantic, SEO-friendly, modular HTML
Content Modelling Principles
The Content
What is content?
- It's information consumed by the end user
- It's the goal of the end user
The Model
What's the model
- Self contained. It isn't dependend on other parts to be understood by the end user.
- Syndicatable. It can be reused in other parts and places, in part or in whole.
- Presentation-agnostic. It doesn't care how it's consumed by the end user.
What's in a Content Model?
Content Fields
This is the data that matters to the end user.
Metadata Fields
Data that matters to the CMS or an application that's consuming the content. It's data about data.
The Fields of a Content Model
i.e., the stuff that really matters
How do we define fields
We define fields in two ways
- TypeNo field is more than one type at a time. It is unchangeable.
- AttributesSome aspect of the field that could be unique or shared with other fields. A field has many attributes
Types of fields
- Text
- A string with or without HTML characters.
- Time
- An hour, month, day, date, or timestamp
- Number
- Usually an integer. Sometimes a float.
- Multimedia
- A binary of some kind. Usually image, video, or document
- Link
- Internal:A link to a location internally, externally, or within the CMS
- Embedded
- A small collection of fields that can be reused in other content models
Field Attributes
There's three ish kinds of attributes we have on a field. Roughly.
- Global. It can apply to any and all fields.
- Type. It applies to only one kind of field type
Global Attributes
- multivalue
- required / optional
Type Specific attributes
Text
- Rich text
- Plain text
- WYSIWYG controls
- Default Value
- Character limit validation
- Pattern validation
Time
- Kind of time (hour, month, day, date)
- Default Value
- Range Validation
Number
- Default Value
- Min / Max validation
Multimedia
- Mime type / binary type
- mime/file ext validation
- size validation
Link
- Internal
- External
- CMS content
- New window/ same window / anchor
Embedded
- Kind of time (hour, month, day, date)
- Default Value
- Range Validation
Number
- Default Value
- Min / Max validation
Multimedia
- Mime type / binary type
- mime/file ext validation
- size validation
Link
- Internal
- External
- CMS content
- New window/ same window / anchor
Embedded
- Mime type / binary type
- mime/file ext validation
- size validation
Link
- Internal
- External
- CMS content
- New window/ same window / anchor
Embedded
usually doesn't have validation. It shares the rules from the fields it contains
Making a Content Model
Craft a Content Model in Five Steps
- Determine if it's Information for the User
- Identify the Fields
- Determine their types
- Establish the attributes
- Name the fields
- Name the model
Wrap up
What have we learned
- Content modelling is good for the CMS, the back-end, and the front-end
- A Content model is a collection of related pieces of information for a user