4

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 .
2
  • Can you edit your question to clarify it a bit more, what exactly do you need to do and perhaps also add the why? – Bart Koopman Aug 26 '13 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? – Alvin Reyes Aug 26 '13 at 17:49
7

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

1
  • :Thanks, this is exactly what i was looking . – Jitender sharma Aug 26 '13 at 8:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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