Scheduled Publishing

Schedule data items to get published or unpublished at a later time.

Global data types and page data folders in C1 CMS can support publishing. Data items of the types that has no publishing support enabled become publicly available once saved.

With publishing support enabled, saving a data item is not enough to make it public. You have to publish it as you do with CMS Pages.

In C1 CMS version 4.3 or later you can also schedule individual data items to get published and unpublished at the date and time specified. This works in the same manner as with CMS Pages.

Both dynamic and static data types (global data types and page data folders) are supported.

Enabling data publishing

Before you schedule data items to get published / unpublished, make sure that the global data type or page data folder they belong to has its publishing feature enabled:

  1. From the "Data" perspective, edit a data type.
  2. Make sure the option "Has publishing" is checked.
  3. Save the data type.

Static data type interfaces should inherit from IPublishControlled for the same purpose.

public interface MyCustomDataType : IData, IPublishControlled

Scheduling data items to get published at a later time

  1. Edit a data item.
  2. In the "Publication settings" group box, specify the date and time in the "Publish date" field.
  3. Save the item.

Scheduling data items to get unpublished at a later time

  1. Edit a data item.
  2. In the "Publication settings" group box, specify the date and time in the "Unpublish date" field.
  3. Save and publish the item.

Troubleshooting

Please not that, if specified, the date and time in the past is ignored, and then removed from the respective field when you reopen the data item.

If a data form has no "Publication settings", please make sure:

  1. You are using C1 CMS version 4.3 (Build 4.3.5555.25838) or later.
  2. You are editing an item of a global data type or a page data folder.
  3. The data type has the publishing option enabled (as described above).
  4. The data type does not have a dynamic data form associated with it.

If a dynamic data form is in use, consider:

  • either deleting it (it can be found below ~/App_Data/Composite/DynamicTypeForms/),
  • or adding the missing elements as shown below:
<cms:bindings>
  <!-- other bindings -->
  <cms:binding name="PublicationStatus" type="System.String" />
  <cms:binding name="PublicationStatusOptions" type="System.Object" />
  <cms:binding name="PublishDate" type="System.DateTime" optional="true" />
  <cms:binding name="UnpublishDate" type="System.DateTime" optional="true" />
</cms:bindings>
<!-- other markup -->
<cms:layout>
  <!-- other field groups etc -->
  <FieldGroup Label="Publication settings">
    <KeySelector OptionsKeyField="Key" OptionsLabelField="Value" Label="Status" Help="Send the data to another publication status.">
      <KeySelector.Selected>
        <cms:bind source="PublicationStatus" />
      </KeySelector.Selected>
      <KeySelector.Options>
        <cms:read source="PublicationStatusOptions" />
      </KeySelector.Options>
    </KeySelector>
    <DateTimeSelector Label="Publish date" Help="Specify at which date and time you want the data to be published automatically.">
      <cms:bind source="PublishDate" />
    </DateTimeSelector>
    <DateTimeSelector Label="Unpublish date" Help="Specify at which date and time you want the data to be unpublished automatically.">
      <cms:bind source="UnpublishDate" />
    </DateTimeSelector>
  </FieldGroup>
</cms:layout>