Copied to clipboard

Flag this post as spam?

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


  • Daniel 44 posts 187 karma points
    Jan 27, 2014 @ 17:51
    Daniel
    0

    UmbracoTemplatePage and image height

    Hi,

    It's a bit of a mess moving over to UmbracoTemplatePage model instead of DynamicNodeContext since every information online is for DynamicNodeContext and none of that works with UmbracoTemplatePage. Is there any documentation of UmbracoTemplatePage?

    Now I'm trying to list the images of a folder set in a media picker and also get the height and width of each image. I can get the list of images with DynamicMedia, but can't seem to get the height and width. Any suggestions?

    DynamicMedia folder = new DynamicMedia(folderId);
    @foreach (dynamic catImg in folder.Children.Items)
    {
    <img src="@catImg.NiceUrl" height="?" />
    }

    Thanks,
    Daniel

  • Daniel 44 posts 187 karma points
    Jan 29, 2014 @ 11:45
    Daniel
    0

    I solved the height issue with CSS instead.

    And for documentation on UmbracoTemplate I found this for reference:
    http://our.umbraco.org/documentation/Reference/Templating/Mvc/ ;

Please Sign in or register to post replies

Write your reply to:

Draft