2

My requirement here is to get the package zip file, check the content inside it, and based on the content present or condition (here my condition is if the component is published using a specific component template), send the package file to some incoming folder if the condition is true.

Solution 1: I predict we can get the package file using the classes which are used in deployment phase like 'PreCommitPhase' or 'CommitPhase'. But I am not sure if it is possible to override their implementations and is there any configuration which we need to mention in 'cd_deployer_conf.xml' or any other xml file for their implementations to get invoked.

Not sure if the above solution is feasible or not. Anyone having any idea about it please let me know. Or if you have any other solution please let me know that as well.

  • If this doesn't need to happen specifically during deployment the other approaches include in the Content Manager (Event System for when the Component Presentation is made or GUI extension letting authors make a "special" template selection) Rendering (Template code, though this is typically "read only"), or possibly in Delivery (crawling or inspecting the rendered page). Deployer and storage extensions seem like a good fit, but what happens after the package is sent to a certain folder? Is the requirement to send only certain CPs to a publication target? – Alvin Reyes Apr 2 '14 at 6:18
  • I agree with Alvin. It's difficult when you start with a technical approach as your 'requirement'. So much of the right answer depends on what you're really trying to do. – Dominic Cronin Apr 2 '14 at 7:05
3

Assuming that you are running Tridion 2013 SP1. You would need to write a custom deployer module that extends the existing module but instead of normal workflow, intercepts the incoming package and moves it to a custom location based on your business logic.

You can find the information about writing custom deployer modules here.

Also once you write your custom module, you will need to modify cd_deploy_conf.xml file and replace the following:

<Processor Action="Deploy" Class="com.tridion.deployer.Processor">

with you custom module details:

<Processor Action="Deploy" Class="com.stackexchange.deployer.BusinessLogicProcessor">

Hope this helps you towards achieving what you need :)

  • Please note that the above will only handle "Deploying" i.e. publishing of content. You will also need to write a custom "UnDeploy" module to tackle un-publishing of items. – Kunal Apr 1 '14 at 7:59
  • See the posting at tridion.stackexchange.com/questions/2062/… to help understand the context of extension points. – Dylan .. Mark Saunders Apr 1 '14 at 8:07
  • Also, I need to know were exactly it will be better to implement this: Storage extension or deployer extension? – user2198112 Apr 1 '14 at 8:26
  • Thanks for the solution. Its working. I am able to get the package file. – user2198112 Apr 1 '14 at 9:13
  • "When a user publishes content, the Content Deployer unpacks the incoming Transport Package and processes its transport instructions. You can change the default behavior of the Content Deployer by creating a custom Module and adding it to a Processor, or by extending an existing Module." So in this case the deployer extension will help you resolve the issue at hand. – Kunal Apr 1 '14 at 9:27

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.