Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 27 additions & 0 deletions blog/2023-03-30-cms.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
----
title: "New property for creating setting-only content types"
description: "Create settings-only content types with the new `onlySettings` property, ideal for non-storefront content like SEO pages."
tags: [cms]
---

The `onlySettings` property is now available for merchants to create content types intended for settings only. ​​This option is particularly useful for content types that do not require storefront content, like an SEO page.

| Image 1 | Image 2 |
|---|---|
| ![without-property](https://user-images.githubusercontent.com/67270558/227936062-02e15860-c6d6-4525-9eed-19c37abfd626.png) | ![with-property](https://user-images.githubusercontent.com/67270558/227936232-fa8dfab7-2f01-42d1-9f68-b2ab8623a3af.png) |
| Image 1 - Content type without `onlySettings` and with two tabs: **Sections** and **SEO**. | Image 2 - Content type with `onlySettings` and with one tab for settings: **SEO**. |

This property ensures that the content type's page displays only the available settings without the **Section** tab.
Follow the steps below to use the `onlySettings` property for your desired content type.

## What has changed?

Previously, when creating or editing a settings-only content type, there were two tabs on the page: one for sections and one for page settings. However, for some content types like SEO, which do not have storefront content, the Sections tab was not relevant.

Now, the `onlySettings` property allows the creation of content types meant for settings only. This change improves content management and improves interface navigation for merchants by displaying only one configuration tab on the page.

## Why are we making this change?
The change enables the creation of setting-only content types that do not require storefront content and simplifies interface navigation by displaying only one tab for the page configuration.

## What needs to be done?
Follow the instructions in [Using `onlySettings` property in a content type](/tbd) documentation and add the property to your store.
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# Using onlySettings property in a content type

The `onlySetting` property indicates that a [content type](https://www.faststore.dev/tutorials/cms-storecomponents/0#content-types) is meant for settings only.

For instance, you might use this attribute for content types that do not require storefront content, such as an SEO page.

| Image 1 | Image 2 |
|---|---|
| ![without-property](https://user-images.githubusercontent.com/67270558/227936062-02e15860-c6d6-4525-9eed-19c37abfd626.png) | ![with-property](https://user-images.githubusercontent.com/67270558/227936232-fa8dfab7-2f01-42d1-9f68-b2ab8623a3af.png) |
| Image 1 - Content type without `onlySettings` and with two tabs: **Sections** and **SEO**. | Image 2 - Content type with `onlySettings` and with one tab for settings: **SEO**. |

This property ensures that the content type's page displays only the available settings without the **Section** tab.
Follow the steps below to use the `onlySettings` property for your desired content type.

## Step-by-step
1. Go to the store's repository and access ` CMS` > `content-types.json`.
2. Choose your desired content type and add the `onlySettings` property as `true`. For example:

```json
{
"id": "SEO",
"name": "Global SEO Settings",
"onlySettings": true,
"configurationSchemaSets": [
{
"name": "SEO",
"configurations": [
...
]
}
]
}
```

3. Sync your changes in the `CMS` folder by running the following command:

```bash
vtex cms sync
```

After syncing your changes, go to your store's Admin and select **Storefront > Headless CMS**. Then, navigate to the content type to which you added the property and ensure the only tab available is for settings.
7 changes: 7 additions & 0 deletions static/data/releases.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
[

{
"title": "New property for creating setting-only content types",
"product": "CMS",
"fileName": "2023-03-30-cms",
"description": "Create settings-only content types with the new onlySettings property, ideal for non-storefront content like SEO pages."
},
{
"title": "New Calendar Views to manage Releases",
"product": "CMS",
Expand Down