Blueprint Developer Manual / Version 2307
Table Of ContentsRequirements
Content should become available online only within a specific time frame. For example, editors need to ensure that a press release only becomes public at a certain day and time or an article should expire after a specific day. In addition, editors want to preview their preproduced content in the context of the website as if it was already available.
Solution
CoreMedia Blueprint supports restricting the visibility of content
items by setting the optional validFrom
and validTo
date properties of
content of type CMLinkable
.
validFrom
| |
UI Name | Valid From |
Description | Content where the "valid from" date has not been reached yet is not displayed on the site yet. |
validTo
| |
UI Name | Valid To |
Description | Content where the "valid to" date has passed is not displayed on the site anymore. By not specifying either of validTo or validFrom, an open interval can be specified to define just a start or end date. |
Table 5.15. Properties for Visibility Restriction
Content is filtered in the CAE during the following two stages of request processing:
The controller is resolving content from a requested URL. See
ContentValidityInterceptor
.In the content bean layer whenever references to other content beans that implement
ValidityPeriod
are returned.
In the CAE visibility checking is implemented as part of an extensible content validator
concept. The generic ValidationService
is configured with a
ValidityPeriodValidator
to filter content when it is requested.
To allow editors to preview content for a certain preview date and time a
PreviewDateSelector
component has been added to Studio,
which sets the request parameter previewDate
. This parameter is respected by the
ValidityPeriodValidator
.