I'm probably reading "album.tpl" from gallery\themes\carbon\templates wrong because I'm not a coder but I am trying to understand. I get stuck after "{if ($childrenInColumnCount == $theme.params.columns)}". Is the code correct?
{if !count($theme.children)}
.
.
{else}
{assign var="childrenInColumnCount" value=0}
<div class="gsContentAlbum">
<table id="gsThumbMatrix" width="100%">
<tr valign="top">
{foreach from=$theme.children item=child}
{* Move to a new row *}
{if ($childrenInColumnCount == $theme.params.columns)}
</tr>
<tr valign="top">
{assign var="childrenInColumnCount" value=0}
{/if}
.
.
.
Posts: 27300
{if ($childrenInColumnCount == $theme.params.columns)}
is correct.What is it you want to do?
Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team
Posts: 2
Thanks for your reply.
It is after the above mentioned line of code I do not understand. I'm simply just trying to learn by understanding the code. I can read and understand nearly all the album.tpl except for these lines:
</tr>
<tr valign="top">
{assign var="childrenInColumnCount" value=0}
{/if}
It is like something is missing or one of those lines is out of place or I am just readin it wrong.
Posts: 27300
You have to have some knowlage of HTML to understand....
means:
close the table row
start a new row
assign a varible $childInColumnCount to zero
close the {if....} from above
There is a theme setting on the theme tab of edit album where you set the number of columns ($theme.params.columns)
in the foreach that started at line 107 the if statement
{if ($childrenInColumnCount == $theme.params.columns)}
the rows of the table are drawn. The if statement checks to see if the table has the right number of columns in the row before closing the row.
Hope that helps.
Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team