Customizing Archiving Logic

Samuel Hii asked on May 26, 2022 00:20

When a content editor archives a page, is it possible to do one or more of the following:

  • Run code to check if any of the children are published. The goal is to prevent the parent page from archiving if any of the children are still published.

  • Customize the archive prompt message based on children published status. For example: use click on Archive, the prompt that is displayed shows "There are child pages that are still published. Please archive the child pages before archiving this page.". If all the child are archived already, the archive prompt shows the default text.

  • For the following Kentico capability: https://devnet.kentico.com/articles/displaying-feedback-within-your-kentico-modules, can this messaging be used in the above scenario. If the custom logic is not feasible, is it possible to show a message on the archive of a page?

Recent Answers


Juraj Ondrus answered on May 26, 2022 05:46

  1. You can use event handler and in the workflow events execute the desired code to unpublish the children.
  2. This would require customization of the admin UI. I would rather use the code mentioned on #1 and do the logic you want to achieve or cancel the archiving. It is up to you.
0 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.