Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Daniel Chenery 119 posts 465 karma points
    Sep 02, 2017 @ 13:42
    Daniel Chenery
    0

    Property Value Converters in Macros

    I'm loving the Property Type Converters shipped with 7.6. They're a fantastic addition!

    However, I'm wondering if they can be used in Macros? Perhaps I've missed something somewhere? Or is it an oversight in the Core?

    Take the following example (where "picker" is a Content Picker):

    var picker = Model.GetParameterValue<IPublishedContent>("picker");
    var udi = Model.GetParameterValue<Udi>("picker");
    

    In this case picker will be null, however udi will have successfully returned the UDI. Of course, once could just simply do var picker = Umbraco.TypedContent(udi), but I was hoping to make use of the Property Type Converters for less code.

    The above example is on Umbraco 7.6.5

Please Sign in or register to post replies

Write your reply to:

Draft