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.

Thumbnails per gallery

January 22, 2008 4:45pm

Subscribe [2]
  • #1 / Jan 22, 2008 4:45pm

    BroQ

    8 posts

    Hi,

    I’m facing the current problem which I must overlook in the documentation.
    Please look at this page first:
    http://blog.brock.be/index.php/blog_fotos/index/

    As you can see in the left “column”, I want to show previews per category.
    All categories are part of one gallery.

    I want to show the lastest 3 categories on this page, including a link towards that specific gallery.

    This is some code I currently have:

    <h1>Latest Pictures</h1>
    {exp:gallery:entries gallery="{gallery_name}" orderby="entry_date" columns="4" rows="2"}
                            <h2 class="category moreBottomSpacing">{category}</h2>
                            <table class="tableBorder" cellpadding="6" cellspacing="1" border="0" width="380px">
    {entries}
                                {row_start}<tr>{/row_start}
    {row}
                                    <td class="thumbs">
                                    <a href="http://{id_path={gallery_name}/image_med}">{thumb_url}</a>
                                    </td>
    {/row}
    {row_blank}<td class="thumbs"> </td>{/row_blank}
                                {row_end}</tr>{/row_end}
    {/entries}        
                
                                <tr>
                                    <td></td>
                                    <td colspan="2" align="center"><a href="http://{category_path=gallery/category}">http://blog.brock.be/img/visit_gallery2.jpg</a></td>
                                    <td></td>
                                </tr>
                            </table>
    {/exp:gallery:entries}

    I can’t seem to figure out how to do this.

    Is there a solution to this problem?

    Kind regards,
    Christophe

  • #2 / Jan 24, 2008 12:01am

    simplyee

    104 posts

    Christophe,

    If I understand correctly, I think you can just state the category to be display, and just repeat 3 times, like:

    <h2>Category 1</h2>
    
    <p>{exp:gallery:entries gallery="(gallery_name}"  category="1" orderby="date" sort="desc" limit="1"}</p>
    
    <p>{entries}<br />
    {row}</p>
    
    <p><div class="thumb"></p>
    
    <p><a href="http://{category_path={template_name}/category}">" title="{title}">{thumb_url}</a></p>
    
    <p></div></p>
    
    <p>{/row}<br />
    {/entries}</p>
    
    <p>{/exp:gallery:entries}

    That’s just from memory, so you may need to fix paths. If it was something different let us know.

  • #3 / Jan 24, 2008 5:23am

    BroQ

    8 posts

    Thank you Krimster. But isn’t the category hardcoded here? I would need the latest 3 categories. And as new categories are created al the time, I would like to have that created dynamically.

    The latest cat id f.e. now is 23.

    In any case, thank you for your replies !

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

ExpressionEngine News!

#eecms, #events, #releases