I want to alter the metadata that is added when publishing items to SmartTarget and as such was looking into adding my own, custom Renderer to the rendering pipeline after the SmartTarget renderer (Tridion.SmartTarget.Publishing.Rendering.SmartTargetRenderer).

I had the idea to read the SmartTarget metadata, alter it and write it back, however it seems like the API is limited to read only actions for existing metadata: Tridion.ContentManager.Publishing.Rendering.RenderedItem has a Metadata property (Read only) and an AddMetadata() method to add further metadata, but I don't see how to update existing metadata. Am I missing something obvious?

Another option is to completely replace the SmartTarget renderer with my own implementation, but I would have to duplicate all of its logic as all internal methods are private, so cannot be extended or reused. From a maintenance point of view duplicating this code is quite undesirable.

1 Answer 1


I was missing something obvious. Despite RenderedItem.Metadata being a readonly property, you can still happily edit its elements to alter the data. A full working example of the custom Renderer can be found in this post.

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.