Copied to clipboard

Flag this post as spam?

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


  • Carl 29 posts 51 karma points
    Feb 18, 2015 @ 02:45
    Carl
    0

    Thumbnail image

    Is there anyway to be able to add a thumbnail image to each post so that when I create a listing page it can show the thumbnail to the side of the excerpt?

    Is it as simple as adding an extra property to the Articulate Post data type? and then render it in my list view? or will this cause issues else where?

     

    Thanks, Carl

  • Carl 29 posts 51 karma points
    Feb 18, 2015 @ 21:58
    Carl
    0

    I've seen the PostModel in the Articulate.dll so I'm not sure it is as easy as just adding the property into the datatype.

    Most blogs I see these days show a thubmail image along side the excerpt on the listing pages, is this a difficult feature to add to Articulate?

    See these as examples of what we are trying to do:

    http://blog.uber.com/
    http://blog.medallia.com/

     

  • Shannon Deminick 1524 posts 5270 karma points MVP 2x
    Feb 19, 2015 @ 11:48
    Shannon Deminick
    0

    You can add whatever you want, it's just normal Umbraco. PostModel IS IPublishedContent it just has strongly typed properties. So go ahead, add the extra property and try it out... never any harm in just trying these things.

  • Carl 29 posts 51 karma points
    Feb 19, 2015 @ 21:50
    Carl
    0

    Ok thanks, I will give that a try... Well there could be if you spend a day trying and get nowhere ;)

  • Shannon Deminick 1524 posts 5270 karma points MVP 2x
    Feb 20, 2015 @ 09:21
    Shannon Deminick
    0

    So you did try it and couldn't get it working? or?

  • Mads 9 posts 29 karma points
    Mar 10, 2015 @ 13:42
    Mads
    0

    @Shannon

    I've added a MediaPicker property to the blogpost document type, but I just can't seem to get the media reference. I'm really clueless as to how to do it!

    I can get the Media NodeId by doing this:

    @{ 
    var image = Model.GetPropertyValue("topImage");
    }

    But I don't know how to get the Umbraco Media-reference from here, so I can output an image-URL. I've tried wrapping it in Umbraco.Media(image), but I get this error:

    Compiler Error Message: CS0234: The type or namespace name 'Media' does not exist in the namespace 'Umbraco' (are you missing an assembly reference?)

    So how do I get the Umbraco Media, when I can't use the Umbraco Helper?

    I'm getting kind of desperate.

  • Mads 9 posts 29 karma points
    Mar 10, 2015 @ 14:37
    Mads
    0

    I found the problem. The issue was, that I was doing this:

    @model Articulate.Models.PostModel

    Instead of this:

    @inherits UmbracoViewPage<Articulate.Models.PostModel>

    Doing the latter gives you access to the Umbraco helper-methods.

Please Sign in or register to post replies

Write your reply to:

Draft