More in this section

Forums / Developing with Sitefinity / Get Links to Images from Image Library

Get Links to Images from Image Library

2 posts, 0 answered
  1. Steve
    Steve avatar
    6 posts
    Registered:
    09 Mar 2009
    21 Apr 2009
    Link to this post
    Hello,
    I would like to know how to get a list of links for images that are in a particular image library.  I have this code:

            LibraryManager imageLib = new LibraryManager();
            ILibrary lib = imageLib.GetLibrary("Image Library Example");
            IList images = lib.GetItems();

    But the objects that I receive back from lib.GetItems() does not have a link that I can use to link to the images.

    I'm using Sitefinity 3.5.

    Thanks.
  2. Slavo
    Slavo avatar
    295 posts
    Registered:
    24 Sep 2012
    23 Apr 2009
    Link to this post
    Hello Steve,

    Here's the full code that would write the URL of all items in the library to the Response stream:

    Slavo
2 posts, 0 answered