Data FAQ

How is localizable and publishable data handled on pages?

How is localizable/publishable data handled on pages?


When you create a data type, you can choose to make it publishable (the "Has publishing" option). It means that the data  in an existing item when used on the website is not available publicly unless it is published. When you save data of the publishable type, you can only view it in the C1 Console (as "unpublished" or "saved"). You have to explicitly publish it to make the changes public.

Besides, if you have your website in two or more languages, you can also enable localization on a data type (the "Is localizable data" option or the "Enable Localization" button). It means that each data item can exist in two or more languages.

When you use publishable/localizable data on pages, Composite C1 takes into account the language and the publication status of each data item. It makes sure that the item matches:

  • the language of the page
  • the action being executed with the page (a public view or a preview/saved page view)

In a nutshell, items localized to Danish will appear on pages on the website in Danish and will not appear on the website in English. Plus, only published items will appear publicly on the website and you can only see unpublished items along with the published ones when previewing the page or viewing a saved page.

You can quickly test this feature to make sure you get the idea:

  1. Create a simple global data type called “Country”, check its "Has publishing" and "Is localizable data" options and add one string field called “Name”.
  2. Add a few items of this data type and publish some of them.
  3. Create a Visual function to render these data items and add it to a page.
  4. Save and publish the page.
  5. Switch the language of the website.
  6. Localize and translate these data items.
  7. Publish some of them.

Now see how it works:

  1. Edit and preview the page in one language. You should see all the items available in this language.
  2. View the published version of the page (Browse Published Page). You should only see published items available in this language.
  3. Switch the language of the website.
  4. Repeat Steps 1-2.