More in this section

Forums / Developing with Sitefinity / Image and Documents gallery of galleries

Image and Documents gallery of galleries

4 posts, 0 answered
  1. Kalvin MacLeod
    Kalvin MacLeod avatar
    19 posts
    Registered:
    15 Nov 2005
    05 Feb 2009
    Link to this post
    Hello,

    Here's what I'd like to do but am getting bogged down in the details. I'd like to be able to have the imageGallery module (or a custom module) show a list of image libraries (I can get that far custom-wise). When someone clicks one of those library links it takes them to the image gallery and shows only the images from that specific library. Is that possible out of the box? If not, any help getting started would be greatly appreciated.

    Thanks as always,

    Kalvin
  2. Georgi
    Georgi avatar
    3583 posts
    Registered:
    28 Oct 2016
    09 Feb 2009
    Link to this post
    Hi Kalvin MacLeod,

    I assume that you mean a User Control, which you can place on the front end pages. Is this correct?

    We do not have such user control, but using our API you could build such. Generally, you need to take all Libraries. Then, when the user clicks on one of them, you can pass the Library's ID in the query string for example, and take all Items in that Library by the ID. The rest is just styling the items.

    I hope this helps.

    Best wishes,
    Georgi
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
  3. Kalvin MacLeod
    Kalvin MacLeod avatar
    19 posts
    Registered:
    15 Nov 2005
    09 Feb 2009
    Link to this post
    Thanks,
    I've already been working my way through the API. I guess my question is instead of reinventing the wheel, is there a way that I can use the existing. Getting the libraries and setting the thumbnails is pretty straightforward but is there a way to use the existing imageGallery control to display just the images from the specific gallery (i.e. use the querystring to determine which images to show).

    I currently have this fairly simple example:
    Dim libraryManager As New Telerik.Libraries.LibraryManager()  
     
    ' get all libraries that are not (false) of type "Image"  
     
    Dim listOfAllLibraries As IList = libraryManager.GetAllLibraries("Image", True)  
     
    If listOfAllLibraries.Count > 0 Then  
     
    For Each libraryItem As ILibrary In listOfAllLibraries  
     
        Dim itemsInLibrary As IList = libraryItem.GetItems()  
     
        If itemsInLibrary.Count > 0 Then  
     
            Dim myGallery As CmsContentBase = itemsInLibrary.Item(0)  
     
            Dim myThumbnail As New HyperLink  
     
            myThumbnail.NavigateUrl = "~/Events/Photo-Gallery.aspx?GalleryTagID=" & myGallery.ParentID.ToString  
     
            myThumbnail.ImageUrl = myGallery.ThumbnailUrl  
     
            phGalleryLinks.Controls.Add(myThumbnail)  
     
        End If  
     
    Next  
     
    End If  
     
     

    I thought maybe using the Gallery's parentID in the querystring would be enough, but apparently not. Is there any settings in the imageGallery control that would allow me to filter like I want?

    Thanks,


  4. Georgi
    Georgi avatar
    3583 posts
    Registered:
    28 Oct 2016
    10 Feb 2009
    Link to this post
    Hi Kalvin MacLeod,

    Actually, you can use the Image Control. This is a great idea.
    The property you are looking for here, is ParentIDs with "s" in the end. The property accepts array of GUID values, these are the IDs of all Libraries that should be shown by the ImageGallery.

    Once again, a great idea.

    Best wishes,
    Georgi
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Register for webinar
4 posts, 0 answered