Also, ich hab hier mein Template:
Code: Alles auswählen
<!-- BEGIN switch_cats -->
<table class="forumline" width="100%" cellspacing="1" cellpadding="3" border="0">
<tr>
<th class="thHead" height="25" valign="middle">{CATEGORYS}</th>
</tr>
<!-- BEGIN row_sub_cats -->
<tr>
<td class="row1" align="center">
<a href="{row_sub_cats.U_CAT}">
<img src="{row_sub_cats.CAT_ICON}" align="left" border="0" />
{row_sub_cats.CAT_TITLE}<br />
</a>
{row_sub_cats.CAT_DESC}
</td>
</tr>
<!-- END row_sub_cats -->
</table>
<!-- END switch_cats -->
Code: Alles auswählen
//The Categories
if( isset($cats) )
{
$template->assign_block_vars('switch_cats', array());
for($i=0; $i<count($cats); $i++)
{
$template->assign_block_vars('row_sub_cats', array(
'U_CAT' => '?cat='.$cats[$i]['cat_id'],
'CAT_TITLE' => $cats[$i]['cat_title'],
'CAT_DESC' => $cats[$i]['cat_desc'],
'CAT_ICON' => ( file_exists('images/cats/'.$cats[$i]['cat_icon']) ) ? 'images/cats/'.$cats[$i]['cat_icon'] : 'images/cats/sample.jpg',
));
}
Wenn ich es mit echo mache, dann geht es, also spirch die variablen und die for scheleife sind korrekt, kommt irgendjemand darauf, warum es nicht geht?
Ich steh total auf dem schlauch :-/