Custom views combined with custom fields, such as for tags, can help you organize and access your content as your app grows. This document covers the use case of applying tags and then creating a custom view based on your tags.
Before you can use tags in a content entry, you must add a custom field to the model you'd like to use tags on. This example adds a tags field to a Page model, but you can add custom fields to any content entry.
- Go to Models.
- Select the model you'd like to use tags with. This document uses the Page model as an example.
- Go to the Fields tab and click + New Tab.
- Name the field tag and set its type to tags.
The following video shows adding a custom field for tags.
For an in-depth explanation of custom fields, visit Custom Fields in the developer documentation.
- Go to Content and open a content entry. These instructions use a Page content entry because the previous section added a tags custom field.
- Click on the Options tab to find the tags custom field the Page model contains and is now displayed in the content entries.
- Add tags, such as marketing, seasonal, or whatever term you'd like to use.
- For published Pages, republish after tagging for display in custom views, which the next section covers. Draft pages update automatically.
The next video shows using the new tags custom field in a Page content entry.
You can create views based on content entry custom fields as well as many other attributes. This example continues with Page tags.
- Return to your content entries list.
- Click the Filter button, then click the + Filter button in the dialogue.
- Select Tag from the dropdown, and apply a filter for Tag contains marketing (or whatever the term is you've created).
- Click Done.
- Click Save View and name your view; for example, Marketing Pages and choose if the view is available for just for your view (you) or for everyone in your Space.
- Your new view, Marketing Pages, is now on the left side of your content entries list under Views, displaying all pages tagged with marketing.
The video below shows creating and saving a View that filters for a marketing tag.
For an in-depth explanation of custom fields, visit Custom Fields in the developer documentation.
For more detail, and another example of a custom view, visit the Creating custom views section of Managing Content.