1-888-365-2779
+1-888-365-2779
Try Now
More in this section

Forums / Developing with Sitefinity / Libraries list

Libraries list

5 posts, 0 answered
  1. Paul
    Paul avatar
    176 posts
    Registered:
    18 Nov 2008
    15 Apr 2009
    Link to this post

    Hi!

    I want to make a control which will get the list of image libraries on my page. But I don't understand what will be the datasource in control. Can you explain work of  such data item as library?

  2. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    16 Jun 2017
    15 Apr 2009
    Link to this post
    Hi Paul,

    Check out the code below. It returns all libraries of type - Image. I am using GetAllLibraries method which supports typeName parameter.

     LibraryManager librariesManager = new LibraryManager();  
            IList libraries = librariesManager.GetAllLibraries("Image"true);  
            if (libraries != null)  
            {  
                foreach (ILibrary lib in libraries)  
                    Response.Write(lib.Name);  
            }  
     

    Best wishes,
    Ivan Dimitrov
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
  3. Paul
    Paul avatar
    176 posts
    Registered:
    18 Nov 2008
    15 Apr 2009
    Link to this post

    Thanks for the code! 

    Now I need a suggestion about photogallery. I want to create a photogallery where images divides by name of event and you have a sidebar with list of this events and by clicking on some events images is loading. How can I organize this with Image&Documents module? 

  4. Dido
    Dido avatar
    149 posts
    Registered:
    24 Sep 2012
    17 Apr 2009
    Link to this post
    Hello Paul,

    I am not sure I understood correctly. If all you want to do is make visual changes, why don't you just override the template, namely LibraryListView.ascx and go ahead? It is just a regular ASP.NET control template.

    You can read more about the Sitefinity architecture here, in the documentation preview.

    All the best,
    Dido
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
  5. Paul
    Paul avatar
    176 posts
    Registered:
    18 Nov 2008
    17 Apr 2009
    Link to this post

    Hi Dido! 

    I need not visual changes. I need a special structure for photogallery. And I did It with using categories and tags. 

    Thanks for the help.

Register for webinar
5 posts, 0 answered