How to show each category seperately

Last post 11-29-2009, 10:17 PM by dbr1993. 8 replies.
Sort Posts: Previous Next
  •  10-17-2009, 1:42 PM 56452

    How to show each category seperately


    Hi there,
     
    I managed to install the new v3.0 of DotNetGallery, and upload photos in seperate categories (albums).
     
    Still don't know how to show each category photos seperately. Could you please give some code examples in VB.NET or C#.NET.
  •  10-18-2009, 8:50 AM 56466 in reply to 56452

    Re: How to show each category seperately

    Hi,
     
    You can try these ways:
     
    GalleryBrowser1.AlbumID="MyCategory";
     
    GalleryBrowser1.AlbumID="Category-1";
     
    GalleryBrowser1.AlbumID="ClasssA-ClassB";
     
    etc.
     
    You can also use the GalleryFiles property to split the albums.
     
    Regards,
    Terry
  •  10-20-2009, 8:39 AM 56510 in reply to 56466

    Re: How to show each category seperately

    I am sorry, but looks I am missing something here. As I can't get it work in that scenario.
     
    MyCategories names:
    Basam1
    Basam2
     
    but see how the category.config files look like:
     

    <category title="Basam1" description="" properties="" />

    <category id="1" albumid="" title="Basam2" description="" properties="" />

     
    Also couldn't find the GalleryFiles property!
     
     
    I hope you try to publish full example here.
     
  •  10-20-2009, 10:15 PM 56539 in reply to 56510

    Re: How to show each category seperately

    Hi,
     
    I am sorry the property name is GalleryFolder .
     
    Gallery3 design 3 level properties to assort the photos .
     
    GalleryFolder + AlbumID is server behavior , be controlled by the programmer.
     
    And Category is controlled by the user.
     
    if developer set :
     
    GalleryBrowser1.GalleryFolder ="~/photos";
    GalleryBrowser1.AlbumID="product1";
     
    the path will be :
     
    /photos/Albums/product1/Default/2009092103312204.jpg
     
    If the user create a category (by clicking UI button) ,
     
    the path will be
     
    /photos/Albums/product1/Category1/2009092103312316.jpg
     
    --
     
    GalleryFolder , AlbumID , Category is design for Gallery ,
     
    And the path is generated by the default storage implementation (DotNetGallery.GalleryDataProvider class)
     
     
    If you want to assort the photos on server side , please use GalleryFolder and AlbumID .
     
     
    Regards,
    Terry
  •  10-21-2009, 9:23 AM 56565 in reply to 56539

    Re: How to show each category seperately

    Thank you Terry,
     
    I understand the whole picture now. The new point here is that you are limiting us to the look and feel of (folders icons):
     
    Can I customize the folders to be like this link:
    We did that with old version
     
    Basam
  •  10-21-2009, 9:48 AM 56567 in reply to 56565

    Re: How to show each category seperately

    Basam,
     
    In Gallery v3 , the 'Layout'/'Theme' is open source.
     
    Developer can modify it to do the customization on the UI part.
     
    So you can try to modify the files under CuteSoft_Client/Gallery/Layout/Explorer/
     
    Regards,
    Terry
     
  •  10-22-2009, 3:12 PM 56604 in reply to 56567

    Re: How to show each category seperately

    Hi Terry
     
    I checked the layout template (explorer). it is built using JavaScript
     
    Can we get a sample of code in VB or C# to retrieve the elements of any category in collection format for example!
    As the idea behid having such controls is to avoid the programming in JavaScript, and keep all our coding in either Vb.Net or C#
     
     
    BASAM
  •  10-23-2009, 8:36 AM 56637 in reply to 56604

    Re: How to show each category seperately

    BASAM,
     
    You can use
     
    using(GalleryDataProvider provider=GalleryDataProvider.CreateInstance(Context,"~/GalleryFiles/"))
    {
    }
     
    to create an object to access the data , for rendering the custom HTML or do other things.
     
    But if you want to modify the UI of the GalleryBrowser , you can only use JavaScript
     
    Regards,
    Terry
  •  11-29-2009, 10:17 PM 57484 in reply to 56637

    Re: How to show each category seperately

    So after creation of the custom data provider, do the images in that folder need to be induvidually added through the provider object's methods?
     
    How can I add the dataprovider to an existing gallery, such as gallerybrowser1 in the examples?
View as RSS news feed in XML