3

We have parent Publication A. B and C are child Publications of A. A, B and C are mentioned as part of metadata on a Page (checkboxes for multi select). If the user selects B and C and publishes the Page from A, we are publishing the Page to B and C. Page is published to A by default.

When only B and C are selected, and published from A, we want to publish to B and C only and not publish from A. Is this possible?

If yes, what is the best location to achieve this (Resolver/Event System, or something else)?

2 Answers 2

4

Controlling where to publish by editing the page Metadata doesn't seem like the best solution to me. If you wish to change where to publish, you would have to edit the metadata each time prior to publishing. What you could do instead is to have a custom page where you would send items for publish only in the desired publications.

If you wish to stick to your original idea, then a custom Resolver + always publishing in all children can be used, where the resolver would remove the unwanted items. Or you could have an Event handler for Publish Transaction save which would remove the transaction from the unwanted publications. But keep in mind that that event is triggered after each state change.

2

I agree with Atila that it would be unconventional to control publishing in this manner and if you're 100% set on this requirement then a Custom Resolver would be the way to go.

As an alternative, if you could control this on a Structure Group level, rather than a Page level, then you could localise the child Structure Groups as necessary and set them to not be publishable (or to be publishable) in the appropriate Publications. However, as I say, this would only be on the Structure Group level and it would also affect all sub-Structure Groups.

enter image description here

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.