Upgrade Your Drupal Skills

We trained 1,000+ Drupal Developers over the last decade.

See Advanced Courses NAH, I know Enough

The peculiarities of content modeling in Drupal 8

Parent Feed: 

We continue to describe the functional capabilities of “the big eight” as Drupal 8 has many improvements over its previous versions. Take a look at the innovations in Drupal 8.3.0, which is its latest minor release that came out this month. If you have decided to build a website in Drupal 8, we have some effective tips for devs describing how to create different useful things for D8 site. One of the first things to do, though, before you start creating your site is content modeling. This is what we’ll focus on today.

First of all, let’s recap what a content model is

A content model is a representation of all the types of content that you will need for your future web project, laid out in a structured manner. It includes the interconnections between content types as well as the distinctive elements of each type. The 8th version of Drupal allows you to model a site’s content through the convenient web-based interface instead of a standard database table. This model is a fundamental first step to the Drupal 8 site building process itself.

What is the main purpose of modeling your content?

Building a content model means everything from building out the structure to meet requirements to filling the site and to support functionality. This structure is designed to become your editor interface and HTML output. If it is well thought-out, it will become the groundwork of a harmonic Drupal 8 site where all elements are systematic, well-ordered and are functioning in conformity without contradicting each other.

What does a content model give to people working on web project?

Content managers whose job consist of producing unique content will learn about the contents optimal volume and other requirements they will have to meet. Also, the content model can provide authors with guidelines on how to upload texts, pictures, audio and video files using Drupal. Those people are expected to work with the CMF every day, so, the more conveniently the model is set up, the less work they will have to do. So keep your model consistent and intuitive.

Web designers can check whether their page designs fit well to different content types mapped out in the content model. If there are any fields with captions or with sortable data that are able to be sorted by the calendar date, alphabet etc. — in short, not just text — then all this should be taken into consideration when creating layouts.

Web developers will get a clear understanding of all the specifications for filling the site. A content model will allow them to configure the content management system in an appropriate way in order to make the editing and publishing process smooth and easy.

To sum up, content models are needed to support a site’s content produced by content managers, the site’s layouts designed by web designers and the site’s functionality developed by web developers.

Should the complexity be decreased?

Drupal 8 has a rich collection of built in entities, such as nodes, taxonomies, comments, users, files, configurables etc. You may be tempted to use them all. But the rule “the more, the better” doesn’t always work. Overloading your content model with all possible content types isn’t a good idea. An immensely complex model is inconvenient to handle. It will cause more time to be spent creating and then maintaining your site. Besides, the more web pages you’ll have to edit, the more mistakes you risk making. This is why you should try to keep your list of content types as short as possible.

How many content types is an optimal option?

The majority of Drupal 8 sites had proved that they don’t require more than 5 content types. If that does not seem to be enough for you, you may seek ways to reuse your existing types instead of adding new ones. For example, you can add extra fields and apply extra layouts to those fields. Additionally, the Form Mode Control and Form Mode Manager Drupal 8 modules allow you create different editing experiences for the same type of content.

So, now you’ve got some basics on content modeling and can start creating your own site on Drupal 8. Our Drupal developers are ready to make your ideas come true, just ask them.

Author: 
Original Post: 

About Drupal Sun

Drupal Sun is an Evolving Web project. It allows you to:

  • Do full-text search on all the articles in Drupal Planet (thanks to Apache Solr)
  • Facet based on tags, author, or feed
  • Flip through articles quickly (with j/k or arrow keys) to find what you're interested in
  • View the entire article text inline, or in the context of the site where it was created

See the blog post at Evolving Web

Evolving Web