Copied to clipboard

Flag this post as spam?

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


  • Patrick 33 posts 82 karma points
    Sep 07, 2012 @ 11:18
    Patrick
    0

    Extending default image and reading new propertie

    Hi,

    I've extended the default Umbraco image with a textstring called description.
    The purpose is to store text which should be displayed within the images alt-tag.

    On the back-end it all works, but I can't seem to figure out how to display the propertie on te frond-end.

    Any help is welcome.

    Greetings, Patrick

  • Douglas Ludlow 210 posts 366 karma points
    Sep 10, 2012 @ 16:17
    Douglas Ludlow
    0

    Hey Patrick,

    You should be able to access the property by simply doing something like this:

    // Get media node by id:
    var image = Library.MediaById(1234);

    // Output description property (if "description" is the alias of the property):
    @image.description
  • Patrick 33 posts 82 karma points
    Sep 10, 2012 @ 16:50
    Patrick
    0

    Thanks!

  • 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