I have a situation where i need to stop unpublishing of specific pages. I want to write some template or code which will stop unpublishing for such pages.

The need is very intresting .

  • I have a page text.xml in CMS , i publish it and it goes to broker as well as on file system as text.xml .

  • I renamed it to text1.xml .

  • I created a new page text.xml and publish it again . This also will go to broker as a new entry and will go to file system as text.xml.
  • If i publish/unpublish the old text1.xml , it removes the text.xml from file system.
  • I need to stop old unpublish to remove it from file system so i want unpublish to fail for this particular page .
  • Can you edit your question to clarify it a bit more, what exactly do you need to do and perhaps also add the why? Aug 26, 2013 at 8:35
  • Do you get the same behavior if you change the order of those steps? For example, wouldn't publishing text1.xml after the rename remove this dependency? Aug 26, 2013 at 17:49

1 Answer 1


Not sure I understand your question completely, but depending on the purpose you can:

  • Configure Event System to fail UnpublishTransaction when you send something to be unpublished
  • Configure Event System to fail when setting item published state (basically during marking item as unpublished)
  • Configure custom resolver to fail when resolving at the very early stage of unpublishing

Rendering doesn't occur during unpublish, so you can't do anything in template

  • :Thanks, this is exactly what i was looking . Aug 26, 2013 at 8:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.