Copied to clipboard

Flag this post as spam?

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


  • charlie 1 post 71 karma points
    Aug 11, 2017 @ 19:31
    charlie
    0

    Utilizing leBlender and Content Picker to display properties from a selected page

    Hey there. I'm trying to utilize leBlender and content picker to display properties from a picked page (an image and some text). But I'm having trouble picking up the properties . Here's a simplified snippet.

    @inherits UmbracoViewPage<Lecoati.LeBlender.Extension.Models.LeBlenderModel>
    @{
        var choosenPage = Model.Items.First().GetValue<dynamic>("featuredClient");
        if (choosenPage != null)
        {
            var featuredNode = Umbraco.TypedContent(choosenPage);
            var client = featuredNode.GetPropertyValue("client");
            var headshot = featuredNode.GetPropertyValue<IPublishedContent>("headshot");
            <h1>@client</h1>
            <img src="@headshot.Url" />
        }
    }
    

    But is get 'Umbraco.Web.PublishedContentModels.Project' does not contain a definition for 'GetPropertyValue'. I'm pretty sure I'm doing something wrong. Any guidance would be greatly appreciated!

  • 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