Snippets
Content type snippets are reusable groups of content elements. You'll use snippets when modeling content.If you ever need to use the same elements repeatedly in a few content types, you can create a snippet to hold those elements. With this approach, you can easily modify the elements from one place. Content contributors won't see the snippets while editing content.
Explore your path to mastery
- When creating your content model, you can reuse content type snippets to develop multiple relationships with other content types.
- As you build the structure for your content, you’ll find that snippets are useful for reusing the same structure for other content types.
Create a content type snippet
Let's look at an example of using a snippet for SEO metadata.- In Content model, select the Content type snippets tab.
- Click Create new.
- Type a name in Content type snippet name.
- Insert two Text elements into the elements area.
- Name the elements Meta keywords and Meta description.
- (Optional) Add guidelines and limitations for each element.
- Click Save changes.
Almost any element can be in a snippetWhen editing snippets, you can use all content elements except for the content type snippet and URL slug elements.
Add a snippet to content types
After you create a content type snippet, use it in a content type. To prevent duplicate elements, you can't use one snippet multiple times in the same content type.- In Content model, open an existing content type.
- Insert the Content type snippet element into the content type.
- Choose a snippet from the drop-down list.
- (Optional) Put the snippet in its own content group for a more organized authoring experience.
- Click Save changes.
Need a shortcut to have snippets in your content model?Check out our preset snippets in content modeling accelerators, which you can import and configure according to your needs.