Back to All Videos

Working Together - Let's Build Models

14m 56s

In this video we're going to be working together in creating our first "real" models for the project moving forward.

During this video, let's go ahead and build out these:

  • A person: A use-case agnostic model for a person, who could either be an author, a customer, or any other person. In many use-cases you wouldn't model "people" like this you'd be a bit more specific, but this example aims to highlight how you can filter people and relate them to other models appropriately to stretch the imagination a bit with "reusable" content.

    • Single-line String Field, for the name of the person,

    • Single-line String Field, for the title of the person

    • Single-line String Field, for the company of the person, and

    • Modular Content Field, to embed the Contact Info and the Testimonial blocks, as they'd be used to enrich the person model

  • A Blog Post: A simple layout to focus on the content creation experience, modelled similarly to the DatoCMS blog posts.

    • Asset Field, for a Featured Image that most blog posts would have,

    • Single-line String Field, for the title of the blog post,

    • Structured Text Field, for the description of the blog post,

    • Structured Text Field with embedded Blocks, for the main content of the post, accepting blocks for images, videos, newsletter signups, testimonials, and statistics,

    • Slug Field, to generate the slug of the post based on the title, with a unique validation in place,

    • SEO and Socials Field, to see our previews and override any fields if necessary, and

    • Link Field, to associate the blog post to an author via the person model

  • A Case Study template focusing on Modular Content to allow the "page building" experience within certain guidelines.

    • Single-line String Field, for the title of the case study,

    • Multiple Paragraph Field, for the description of the case study,

    • Modular Content Field, for the actual content of the case study, to create a drag-and-drop layout using the Content Block, Statistic, FAQ, Testimonial, Image, and Video blocks,

    • Link Field, to relate the case study to a customer via the person model,

    • Slug Field, to generate the slug of the case study based on the title, with a unique validation in place, and

    • SEO and Socials Field, to see our previews and override any fields if necessary.

  • An About page, showcasing the "single instance model" feature, ensuring that only one about page is created and no more:

    • Single-line String Field, for the title of the page,

    • Modular Content Field, for the content of the page, and

    • Slug Field, to generate the slug of the case study based on the title, with a unique validation in place.