ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

EE 1.6 - Photo gallery question: Image preview for each sub-category?

February 24, 2010 3:37pm

Subscribe [2]
  • #1 / Feb 24, 2010 3:37pm

    XLCowBoy

    2 posts

    Hi everyone!

    I’m currently building a site for an events company, and one of the “meats” of their site will be their photo gallery. Based on the way the Photo Gallery module is built, the site works out something like this:

    {exp:gallery:categories gallery="{gallery_name}”}

    Image Gallery Main Page:
    - Public Events (category)
    —Nokia Launch Party (subcategory)

    - Private Events (category)
    —Thomas-Sy Wedding (subcategory)

    - Public Events (category)
    —Bacardi Launch Party (subcategory)

    - Public Events (category)
    —Happy Mondays @ The Tent (subcategory)

    {/exp:gallery:categories}

    Now, these will appear based on date on a main gallery page, however, the client wants each subcategory to have a thumbnail to preview the content of each subcategory. The thing is, there’s no client-friendly way to manually do this.

    So my question is: is there a way to do this automatically? e.g. the first uploaded photo becomes the subcategory thumbnail? Can an exp:query fix this? Or am i doing this totally wrong?

  • #2 / Feb 24, 2010 4:20pm

    Boyink!

    5011 posts

    So my question is: is there a way to do this automatically? e.g. the first uploaded photo becomes the subcategory thumbnail? Can an exp:query fix this? Or am i doing this totally wrong?

    I’ve used this approach on a client site where the EE gallery on the backend drove a SlideShowPro gallery on the front end.  I used a query there as well.

  • #3 / Feb 24, 2010 5:24pm

    XLCowBoy

    2 posts

    So my question is: is there a way to do this automatically? e.g. the first uploaded photo becomes the subcategory thumbnail? Can an exp:query fix this? Or am i doing this totally wrong?

    I’ve used this approach on a client site where the EE gallery on the backend drove a SlideShowPro gallery on the front end.  I used a query there as well.

    Small world. I first learned how to build on EE from your tuts.  😊

    Anyhow, these two links helped out a lot:

    http://5pieces.com/blog/expressionengine-gallery-alternative-template/

    and

    http://expressionengine.com/wiki/Gallery_Module_Alternative_Templates/

    First one got the thumbnail working on default, the second one helped out with the pagination and links, but…

    Is there no way to display the category that the sub-category belongs to?

    e.g.

    Events (says Launch Party instead of Events)
    - Launch Party Image (working)
    - Launch Party (working)


    My code looks like this atm:

    <a href="http://{category_path=template_name/category}{entry_id}/{category_id}">{site_url}/images/gallery/{cat_folder}/{filename}_medium.jpg</a>
    <h3>{cat_name}</h3><p> <!-- this should be something else obviously, but I have no idea what --></p><h2><a href="http://{category_path=template_name/category}{entry_id}/{category_id}">{cat_name}</a></h2>
  • #4 / Feb 24, 2010 5:40pm

    Boyink!

    5011 posts

    Glad you found them useful.

    It’s been a long time since I’ve messed with the gallery module - but would the subcategory row variable pair help?  If not it might be you’ll need another custom query. 

    It’s usually at this point where I start to think about just building a custom gallery using the weblog module..😉

  • #5 / Feb 24, 2010 6:09pm

    XLCowBoy

    2 posts

    Lol. Well, just tried the subcategory row. No dice.

    I guess we’re left with either another custom query, or a text field for the client.


    Ah EE. How you make my life both easy and hard at the same time…

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases