Skip to content

Instantly share code, notes, and snippets.

@mskutta
Last active August 29, 2015 14:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mskutta/c03f95e1e6c995348b87 to your computer and use it in GitHub Desktop.
Save mskutta/c03f95e1e6c995348b87 to your computer and use it in GitHub Desktop.
Get item and evaluate if desired
var item = (Item)context.CustomData["Item"] ?? context.VersionToPublish;
if (item == null)
return;
var template = TemplateManager.GetTemplate(item);
if (!_templateIdsToPublish.Any(x => template.ID == new ID(x)))
return;
// Don't publish messages for standard values
if (item.ParentID == item.TemplateID)
return;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment