Masthead images on our website change constantly. Many of them promote events that are date specific and need to be removed when the event has passed. Sitecore has a nice feature that allows you to add a Publishable To date to a masthead item indicating when you want it to be removed from the website. The problem is that you have to remember to publish the masthead on that date in order for it to be removed! It kind of defeats the purpose don’t you think?
We did too! So we wrote a daily process that searches the Sitecore tree and identifies masthead items to be removed. Any masthead where the current date matches the Publishable To date will be removed from all web pages that contain it. The masthead itself is not deleted.
To set the Publishable To date, click on the masthead item in the Assets folder under the item you are working on.
On the Publish tab, click Change and the Publish Settings window will appear.
Select the Item tab. In the Publishable To field, click the first down arrow to select the date that you want the masthead to be removed. (The second arrow is for the time. We aren’t using that.)
Click OK.
Publish the masthead to beta for preview and submit it to the workflow. That’s all there is to it!
A Look Ahead
We have plans to modify the update process to also look for Publishable From dates. You will be able to submit masthead images ahead of time and they will appear on the website on the date you choose.
Posted in: Sitecore Tips
Comments are disabled