Copied to clipboard

Flag this post as spam?

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


  • zarlss 1 post 71 karma points
    Aug 11, 2017 @ 19:31
    zarlss
    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!

Please Sign in or register to post replies

Write your reply to:

Draft