Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to remove items from publishing using a Tridion Resolver?

I am trying to do implement a custom resolver for a component as described here by Chris: http://www.tridiondeveloper.com/the-story-of-sdl-tridion-2011-custom-resolver-and-the-allowwriteoperationsintemplates-attribute

I want to remove some of the binaries (mostly pdf's) used in component and prevent them from publishing. I am able to get the list of used items using item.GetListUsedItems method. How do I remove them?

using : tridion 2009

like image 779
user1373140 Avatar asked Jul 31 '12 12:07

user1373140


1 Answers

At Publishing time the resolver process determines which items should be published, like when you publish a Structure Group, the default Resolver will add all Pages in the Structure Group to the Publish Transaction.

Resolvers only deal with items in the Publish Transaction which are directly Publishable, and those are Pages and Dynamic Component Presentations. So a Resolver is not handling the linked Multimedia Components, those are Published by the Template code through calling the AddBinary() method.

If you want to remove Multimedia Components from your Publish action, you should look into the Component Template which is handling those (if they are added to the Package, the Default Finish Action TBB normally picks them up and Publishes them). But keep in mind, a Multimedia Component needs to be Published at least once else you will never get it on your presentation server.

like image 145
Bart Koopman Avatar answered Oct 20 '22 06:10

Bart Koopman