Umbraco Ditto – How to access mapped node during and after mapping

Hello all!

I wanted to go over some more Umbraco Ditto extension findings.

While I was having the problem solved here, I was also running into another problem in which I need to not only access current content node, but also the current model that was being mapped. After speaking with Lee Kelleher, I found that there is yet another undocumented (Lee is a busy guy) type that can help in these situations. This type (as an attribute) is called [DittoConversionHandler].

This guy decorates your model as such:

and is implemented like this:

Hopefully this will help for any of you who were wondering how to access the current object being mapped through Ditto!

Happy Dittoing,

Logan

Leave a Reply

Your email address will not be published. Required fields are marked *