We have a requirement to have a component (exactly 1) mandatory on a page.

Say, admin user has created a page and then no other user can edit-save that page without one of that component on that page.

enter image description here

  • 4
    Since you seem to be using XPM, I would suggest to use pagetypes and regions for this. Make the CP required in that region to prevent users from deleting it. Jul 18, 2014 at 9:03
  • A 1:1 requirement suggests this presentation belongs with a given "page type" (small "p," as in the concept). If you have other components that represent Web page (e.g. SEO data) you could link to this there instead, otherwise you might add it via the page template. Whatever approach you use, consider basing it on configurable prototypes--that way you can handle new requirements through page and content changes rather than (just) code. Jul 20, 2014 at 17:43

3 Answers 3


No such out of the box functionality is available and Event system is one of the way to achieve it. You may write a custom event system code to achieve this on Page Save event.


If the component is a mandatory feature of the page, then your template should take care of this. If it's truly mandatory, why make it manageable?

This should simply be a question of invoking RenderComponentPresentation with the component and template ids as parameters. To make this maintainable, I'd suggest passing the webdav urls of the component and template as parameters to your template building block.

If you need to allow it to be managed, then the correct approach is to use the events system to check for conformance when the page is saved.

  • Nice thought Dom :) Jul 21, 2014 at 3:42
  • Nice answer Dom. However, when @Saurabh said "...without one of that component on that page.", I think that he meant "... without one Component, based on a specific Schema, on that Page." Jul 21, 2014 at 7:10
  • @JonathanWilliams - sure, well in that case, as I said, the events system is the way to go. Jul 21, 2014 at 7:29

In addition to Pankaj's answer, the Tridion GUI is also extensible and it maybe possible to extend the Page View such that based on some criteria (the chosen page template perhaps), a Component Presentation is added.

This may require going deep in to the GUI Extension framework - no mean feat!

Alexander's site is a pretty useful resource - http://tridion.uibeardcore.com/

  • 2
    Whenever you need to validate something in a data model, consider it mandatory to perform the validation on the server and optional to perform it on the client. The reason for this is that not every user may use your client application and some users may actively work around your client-side validation. So any validation you do in the client may be bypassed. In the Tridion case for example anyone writing code using the Core Service will not trigger your Anguilla validation, while they will actually trigger the event system's validation. Jul 18, 2014 at 13:08

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.