Copied to clipboard

Flag this post as spam?

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


  • David 27 posts 127 karma points
    Aug 06, 2019 @ 14:52
    David
    0

    Can't access a a property of the Document Type when using MultiPicker

    Hi all, I'm trying to create a featured content section where a user can select a a piece of content which will then display the title of the content and the content description which is a text area data type.

    @inherits Umbraco.Web.Macros.PartialViewMacroPage
    @{
    var multiUrlPickerDyn = CurrentPage.highlightedContent;
    if (multiUrlPickerDyn.Any())
    {
       <div class="popular">
            <section>
                <header>
                    <h2>Highlighted content</h2>
                </header>
                <ul class="nav">
                    @foreach (var item in multiUrlPickerDyn)
                    {
                        <li>
                            <a href="@item.Url">
                                @item.Name
                                @item.contentDescription
                            </a>
                            <a>
    
                            </a>
    
                        </li>
                    }
                </ul>
            </section>
        </div>
    }
    }
    

    I can access @item.Name but I can't access contentDescription as it wont allow me to, does anybody have any idea how I could do this?

    Thanks,

    David

  • Amir Khan 1199 posts 2567 karma points
    Aug 06, 2019 @ 21:25
    Amir Khan
    0

    Have you tried something like this?

    @item.GetPropertyValue("contentDescription")

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies