thanks jumpd, i actually acheived what i want through the use of inserting an if...else statement to change the controls for the <if> statements within the template.
Problem I am having now however is that the first instance of the $artisttype var (which occurrs in the first group of artisttypes) is not outputting the correct value for those artisttypes. Here's my php now...
PHP Code:
$choicecounter = 1;
$currentartisttypeid = 0;
while ($artist = mysql_fetch_array($qryartists))
{
$artistimage = $artist['image'];
$artistimageid = $artist['artistimageid'];
$artisttitle = $artist['artisttitle'];
$artisttype = $artist['artisttype'];
if ($currentartisttypeid == 0)
{
$isnewtype = 0;
}
else
{
if ($currentartisttypeid != $artist['artisttypeid'])
{
$isnewtype = 1;
$choicecounter = 1;
}
else
{
$isnewtype = 0;
}
}
$currentartisttypeid = $artist['artisttypeid'];
eval('$artists .= "' . fetch_template("erc_artistroster_rpt") . '";');
$choicecounter++;
if (($choicecounter % $artists_setup['columns_to_show']) == 0)
{
$newrow = 1;
}
else
{
$newrow = 0;
}
}
and here's the html for the "erc_artistroster_rpt" template...
HTML Code:
<if condition="$isnewtype">
</tr>
</table>
</td>
</tr>
</table>
<br>
<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">
<tr>
<td class="tcat">$artisttype $vbphrase[artists]</td>
</tr>
<tr>
<td class="alt1" align="left" width="100%"><a name="$artisttype"></a>
<table>
<tr valign="top">
</if>
<td class="ercshowartists" align="center">
<a href="artist.php?do=artist&artistid=$artist[artistid]">
<img src="forum/modules/erc_thumbnailimage.php?artistimageid=$artist[artistimageid]&width=220" alt="$artist[artisttitle]" border="0">
</a><br><br>
$artist[artisttitle] $choicecounter
</td>
<if condition="$newrow == 1">
</tr><tr valign="top">
<td><img height="4" src="$vboptions[bburl]/clear.gif"></td>
</tr><tr valign="top">
<else />
<td><img width="4" src="$vboptions[bburl]/clear.gif"></td>
</if>
and the main template for the page is:
HTML Code:
<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">
<tr>
<td class="tcat">$artisttype $vbphrase[artists]</td>
</tr>
<tr>
<td class="alt1" align="left" width="100%"><a name="$artisttype"></a>
<table>
<tr valign="top">
$artists
</tr>
</table>
</td>
</tr>
</table>
any ideas? i'm stumped... i appreciate any help