Matrix: 1 photo on first row, then a table

shapiroja

Joined: 2005-01-23
Posts: 11
Posted: Sat, 2005-09-10 18:18

Hi,

I've just installed G2 RC2 and think it's absolutely fantastic. However, there is one customisation that I would like to achieve for a couple of albums and am not sure where to start (am a bit of a newbie on this stuff).

Essentially, I would like to have a copy of the Matrix theme where everything is exactly the same but the first row in the album table is for one large thumbnail (like a header picture) followed by a table of photos for the rest.

For example, I took a driving trip and want to show a larger map of the route on the first row, followed by my photos for that day below in a table.

Is this possible with minor changes to a theme file(s)? Or is this a more fundamental change?

If simple, can anyone please point me in the right direction? (I'm thinking it's not a major change in the album.tpl file, but don't want to screw around and mess it up)

Otherwise, absolutely love G2! Great work everyone and thanks!

 
nivekiam
nivekiam's picture

Joined: 2002-12-10
Posts: 16504
Posted: Sat, 2005-09-10 19:01

Have a look at this user modification, http://gallery.menalto.com/index.php?name=PNphpBB2&file=viewtopic&p=158451#158451

It's not 100% what you're looking for, but I think it'll get you pointed in the right direction.

 
shapiroja

Joined: 2005-01-23
Posts: 11
Posted: Sat, 2005-09-10 22:35

Thanks nivekiam, it is very much like what I'm trying to do. As you say, it got me started and with a little playing, I've managed to get what I wanted.

Below is how I managed to make this work, in case anyone else wants to do the same thing. Essentially, I copied the "move into a new row" bit and went into the new row if item count = 1 then I reset the item counter to the number of columns (for mod purposes later). Then I put in the "move to a new row after a full row" section which did so when the item count was a multiple of the column count. To ensure this worked, I removed the count reset from each new row.

           <table id="gsThumbMatrix" width="100%" >
             <tr valign="top"><td align=center ><table width="100%"><tr> 
              {foreach from=$theme.children item=child}

              {* Move to a new row after first item*}
              {if ($childrenInColumnCount == 1)}
                </tr></table></td></tr>
                <tr valign="top"><td align=center ><table width="100%"><tr>
              {assign var="childrenInColumnCount" value=$theme.params.columns}  
              {/if}

              {* Move to a new row after a full row*}
              {if ($childrenInColumnCount mod $theme.params.columns == 0)}
                </tr></table></td></tr>
                <tr valign="top"><td align=center ><table width="100%"><tr>
              {/if}

              {assign var=childrenInColumnCount value="`$childrenInColumnCount+1`"}

etc.  etc.

It works like a charm.

see http://kodos.no-ip.com/gallery/Parent-Travels/2003Maritimes/ and it's sub-albums for examples of the finished product.

Thanks again.