3

Is there any way to merge two publish output files?

Below is scenario:

  1. Page A is created in parent publication.
  2. Same Page A is localized in child publication. We have localized component added on this page.
  3. Author will publish Page A from parent publication.
  4. Published output will have content from parent publication as well as localized content. This will be single file.

My output needs to look something like this:

=>Page A

=>Parent Content

=>Parent Content

=>Localized content

=>Localized content

Any suggestions on how it can be achieved.

Thank you in advance.

4
  • Welcome to Tridion stack exchange please share your Tridion version and what templating are you using
    – Anand N S
    Jun 10, 2021 at 5:56
  • So you want normal behaviour when publishing from the child publication, but when you publish from the parent? Odd, but I guess the logic to check for localised child content could be achieved in your TBB code.
    – Neil
    Jun 10, 2021 at 6:27
  • Very interested in hearing the business case? As Neil says, you could check for localized content and read the localized content in but I wonder how that will impact your publishing if you localize in multiple children. Jun 10, 2021 at 9:32
  • Welcome, Vivek. I'd also be interested in the use case. What you're describing sounds more like a question about showing related content rather than publishing and BluePrinting. I can see challenges with your desired output if you have multiple Publications, duplicate content, or a mix of shared and localized content. The BluePrinting inheritance model works from the current context; so publishing from the parent Publication will make it challenging to determine the actual child pages if that makes sense. Jun 14, 2021 at 16:20

1 Answer 1

2

This is a very curious requirement. But again, most of the business requirements are.

How I can see from your comments, you don't want to use the BluePrint for this which would be the proper case. I would in your case argue that the parent page should have general content and the child page should have general and specific content.

But if you do not want that, you can always use templating to generate content on a page. For example, this is how I would approach it. I would create a specific page template just for these cases. I would then implement templating in such a case that when rendering is being executed in the child page, you would get content from the parent page in a specific parent publication and render it also using Engine. That is the only way I think would be OK.

You also need to restrict this (configure in templating which publications have these include options) and please note that this will have extra confusion for some editors.

2
  • Sounds good for a pair of parent and child Publications, though I'm curious what the logic would be for a parent with multiple children. Or when a would-be child page is actually controlled by a different parent Publication? :-O Jun 14, 2021 at 16:14
  • yeah, it gets complicated way too easily. that is why I am for blueprint at the start. in this scenario I would go with some sort of publication mapping in config component. something like parent-to-child mapping that would be retrieved every time.
    – Marko Milic
    Jun 14, 2021 at 16:44

Your Answer

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

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