Scheduling page versions for different locales

This is an experimental feature. Use this feature at your own risk.

Say you have 1 project, and you have multiple locales within that project. You don't always want the same page version live for each locale.

So how would you do this with commercetools Frontend? Although this isn't the official way to do it yet, there's a workaround you can do, which we'll go through in this article.

Scheduling page versions for different locales

  1. Open the studio, go to Site builder, then select the page folder where you want your different page versions to sit

  2. Click the more icon on your Default version of your page

78281f8 Hover on the page version then click the more icon

  1. Select Duplicate version, change the name of the page version, then click Save

7f3a9ef Select duplicate page version

You can then duplicate this version again if you want to make another locale.

  1. Click the more icon on your new draft version, then select Schedule

7901e4b Select schedule page version

  1. Fill in the Criterion depending on your locale (leave the dates empty) and click Save

In this example, we're using our French locale with our projectname URL as the host.

d29e3af Input the criterion for your host and locale

There are a few things to take note of when doing this step:

  • There's no error handling here, so you'll need to check your live sites to know that it's working as expected.
  • The Criterion language is specific, so you need to make sure the spaces are in the same place as it is in the below example:
locale = 'en\_GB' and host = ''
  • You must add a Criterion and always keep it there. If you save your schedule without it, this will override your current Default version.

You can also use this method to test a page from your local environment. Use host = '<project-customer>'.

  1. Check your locale version is now in the Live section

Your locale version will also appear in the Scheduled section.

ad45cbf Locale version is now in live and scheduled section

Editing a scheduled page version

To edit any of the page versions, click the edit icon

20f7f03 Click the edit icon on the page version to edit whats in the page builder

To edit the Criterion, click the more icon on the Scheduled version, then Edit schedule.

134d872 Click the more icon then edit schedule

Removing a locale page version

To remove the locale page version, click the more icon on the Scheduled version, then click Make Draft.

703b597 Click the more icon and then select make draft

Deleting a locale page version

To delete the locale page version completely, click the trash can icon on the Scheduled version.

1d00da0 Click the trash can icon on the scheduled page version

Adding time-based scheduling to a locale page version

You can also add time-based scheduling to your locale pages. Add in the dates along with the criterion.

3e25c94 You can also add time based scheduling to your locale