For some reasons, I customized DD4T template building block not to publish multimedia component.
BinaryPublisher's "PublishItem" method publishes multimedia component, so I removed code and added only one line in the method. My code is following.
protected virtual void PublishItem(Item item, TcmUri itemUri)
{
item.Properties[Item.ItemPropertyPublishedPath] = string.Empty;
}
As a result, multimedia component is not published as I expected.
Also some multimedia components have already been published before template building block is customized, so I want to unpublish them.
When published a component which has link to multimedia component with customized template, I noticed that the multimedia component is unpublished(removed from Broker DB).
This is good for me, but I wonder why multimedia component is unpublished by publishing with the "customized" template.
My questions are following.
- How does template building block unpublish multimedia component?
- Is this behaviour(multimedia component is unpublished) expected?
Regards,