Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Use Entry Types for the Love of... Clients

Use Entry Types for the Love of... Clients

Entry Types are the under-appreciated heroes of Craft CMS. With properly used entry types you can create a content model that allows your clients the freedom they expect from a modern CMS. In this session, Stephen will show you how they use Entry Types in our builds at Foster Commerce for both Twig and Nuxt headless projects. For a little spice, we'll explore the edge cases and some arguments against using them. By the end, you'll be singing the praises of Entry Types and we'll start a fan club.

Stephen Callender

October 20, 2021
Tweet

More Decks by Stephen Callender

Other Decks in Technology

Transcript

  1. X

  2. 1. Craft’s section types 2. Entry types 3. Assumptions about

    the expectations of a CMS 4. When to use Entry Types vs Singles 5. (If time) Twig and Nuxt 2 examples
  3. Section type Channel Structure Single For content that’s: A uniform

    collection Varied but interrelated Standalone Relationship to other entries Flat Hierarchical Independent URI format Shared Shared & nested Unique Number of entries Many One or more Exactly one Manual sorting No Yes N/A Multiple entry types Yes Yes No
  4. What’s an entry type? “A set of input fields that

    belong to a Section.” https://craftcms.com/docs/getting-started-tutorial/configure/modeling.html#assets
  5. 1. ✅ Craft’s section types 2. ✅ Entry types 3.

    Assumptions about the expectations of a CMS 4. When to use Entry Types vs Singles 5. (If time) Twig and Nuxt 2 examples
  6. A cornerstone of any content management system is to provide

    — for people who don't know how to write HTML — a no-code way to update a website within some organizational and design constraints.
  7. 1. It should allow nesting of pages. 2. It should

    allow creating pages from reusable templates. CMS Bare Minimum Assumptions
  8. But what if the client deletes the page? ❌ 1.

    Let them! 2. Trust them! 3. Use permissions.
  9. But what if the client moves the page, messing with

    SEO efforts? ❌ 1. Let them! 2. Trust them! 3. What if they want to improve SEO?
  10. 1. It should allow nesting of pages. 2. It should

    allow creating pages from reusable templates. CMS Bare Minimum Assumptions
  11. 1. It’s the homepage. 2. It’s a utility page that

    exists whether there’s an entry in Craft or not. So when is a Single a good idea?
  12. 1. Create a “redirect” entry type. 2. Create a “hidden”

    entry type. Cool things you can do with entry types