Headless CMS > Essentials
Content Entry Revisions
Learn how to publish a specific version of a content entry, and create a new version of a content entry by deriving from a previous revision.
- how to create multiple revisions of a content entry and publish a specific one
- how to create a new content entry version from a previous revision
In Webiny, each modification in a content entry that is saved or published is stored as a separate revision. In this tutorial, we will learn how to create multiple revisions of a content entry and publish a specific revision. We will also learn how to create a new content entry version from a previous revision. As an example, we will use the Product content model that we created in the Create Content Model tutorial.
We will do this in 3 steps:
- Step 1: Create a content entry in the Product content model and make multiple revisions.
- Step 2: Publish a previous revision of the content entry.
- Step 3: Create a new content entry version from a previous revision.
Step 1: Create a Content Entry and Its Revisions
If you are not familiar with how to create a content entry, please follow the Create Content Entry tutorial.
Create a content entry in the Product content model with the following attributes:
Field Value Name Men’s Blue T-Shirt Description Half Sleeved, Regular fit, Cotton blend, Blue T-shirt for Men Price 15 Category Clothes Note: If you haven’t added the Category field to the Product content model, skip it (or add it by following the Reference Field tutorial).
Now, update the Name and Description textboxes with the following values:
Field Value Name Men’s Solid Blue T-Shirt Description Half Sleeved, Regular fit, Cotton blend, Solid, Blue T-shirt for Men Click SAVE & PUBLISH.
Note: Clicking SAVE will create a new version of the content entry with updated field values and save it as a draft. Whereas clicking SAVE & PUBLISH will create a new version and publish it.
Create another revision by updating the Name and Description textboxes with the following values:
Field Value Name Men’s Solid Round Neck Blue T-Shirt Description Round Neck, Half Sleeved, Regular fit, Cotton blend, Solid, Blue T-shirt for Men Click SAVE & PUBLISH.
Step 2: Publish a Previous Revision
In the Men’s Round Neck Solid Blue T-Shirt content entry, click the Kebab Menu Icon ( ⁝ ).
✔️ Menu opens with Trash Entry, Schedule unpublish, and Show entry revisions options.
Click Show entry revisions.
✔️ The Entry revisions section opens.
To publish the previous Men’s Solid Blue T-Shirt revision, click the Kebab Menu Icon on it ( ⁝ ).
✔️ Menu opens with New revision from current and Publish revision options.
Click Publish revision.
✔️ The Publish Product confirmation screen appears.
Click Yes, publish!
✔️ The Men’s Solid Blue T-Shirt revision gets published.
Step 3: Create a New Content Entry Version From a Previous Revision
In the Men’s Solid Blue T-Shirt content entry, click the Kebab Menu Icon ( ⁝ )
✔️ Menu opens with Trash Entry, Schedule unpublish, and Show entry revisions options.
Click Show entry revisions.
✔️ The Entry revisions section opens.
To create a new entry version from the previous Men’s Blue T-Shirt revision, click the Kebab Menu Icon on it ( ⁝ ).
✔️ Menu opens with New revision from current and Publish revision options.
Click New revision from current.
✔️ A new draft of the previous Men’s Blue T-Shirt revision gets created.
Optional: Make the desired change(s) in the respective field(s).
Click Save & Publish.
✔️ The Publish Product confirmation screen appears.
Click Yes, publish!
✔️ A new content entry revision of the Men’s Solid Blue T-Shirt entry gets published.