7.6 Multinode Treepicker - Property Value Converter

From the 7.6.2(3) upgrade notes:

In Umbraco version 7.6.2 we made a mistake in the Property Value Converts (PVCs) which was corrected 2 days later in version 7.6.3. If
you were having problems with querying the following datatypes in the
frontend, then make sure to upgrade to 7.6.3:

  • Multi Node Tree Picker
  • Related Links
  • Member Picker

How do I access the Multi Node Tree Picker values from my Macro Parameters? This doesn’t work if I enable property value converters:

My View:

@Umbraco.RenderMacro("HighlightSection", new { SelectedHighlightSections = CurrentPage.selectedHighlights })  // content type multi node tree picker property editor

My Macro:

    @inherits Umbraco.Web.Macros.PartialViewMacroPage
@{
    var items = Model.MacroParameters["SelectedHighlightSections"].ToString().Trim();

    string[] _items = new string[0] { };

    _items = (items.Length > 0) ? items.Split(',') : _items;
    }
@if (_items.Length > 0)
    {
    <section id="highlight-section" class="sections highlight-section">
        <div class="container-fluid">
            <div class="row text-center">
                @for (var i = 0; i < _items.Length; i++)
                {
                    var item = Umbraco.TypedContent(_items[i]);
..... more stuff

if i change:

var items = Model.MacroParameters["SelectedHighlightSections"].ToString().Trim();

To:

var items = Model.MacroParameters["SelectedHighlightSections"]; // .ToString().Trim();

When I debug “var items” it returns:

Value:
“System.Collections.Generic.List`1[Umbraco.Core.Models.IPublishedContent]”

Type: object {string}


This is a companion discussion topic for the original entry at https://our.umbraco.com/forum/87784-76-multinode-treepicker-property-value-converter