How To Update Within A CMS Strategy

This article describes the special consideration for calling an Update method within the context of a strategy event. If an update is called in the context of the strategy it would then fire the strategy event again and cause an infinite loop and fail.

Here are the steps needed to avoid the inifinite loop and implement an update in a CMS strategy.

  • At the beginning of the strategy, check whether request.items contains a key for content item id and lang
  • Then add the key to request.items.
  • If request.items already contains the key, then just return as normal
  • If it doesn't then do the special programming.

For more information on strategies please see here.