una soluzione lavrei trovata ma come passarla a smarty?inoltre c e un contenuto a permesso 2 che se lutente eloggiat si deve vedere ????????????????????????????????Codice PHP:
$colonne = 2;
$tot_righe = $num_record/$colonne;
$i_x = 0;
$x_x = 0;
$k_x = 0;
$cell_width = floor(100/$colonne);
$sql = "
SELECT *
FROM blocks_home
WHERE posizione BETWEEN 1 AND 6
AND permission = 1
AND enable = 1 ";
$query = @mysql_query($sql);
$num_record = @mysql_num_rows($query);
echo
'<table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr>';
while($array = mysql_fetch_array($query)){
$i_x++;
$k_x++;
$x_x++;
echo"<td id='iconticket'><a href ='' target='_parent'>[img][/img]</a></td><td id='titlemessage'><a href ='$path_site/".$array['path']."/index.php' target='_parent'>[b]".constant("".$array['nome']."")."[/b]</a>
<span class='smalltext'>".constant("".$array['description']."")."</span></td>";
if($i_x == $colonne) {
echo"</tr>";
if ($i_x == $colonne && (($x_x/$colonne) != $tot_righe)) {
echo"<tr>";
}
$i_x = 0;
} // fine $i_x == $colonne
} //fine del ciclo
if ($colonne <= $x_x){
if (($k_x%$colonne) != 0){
$indice = $k_x;
$indice++;
if(($indice%$colonne) == 0 ){
echo'</tr>';
}
} //fine ($k%$colonne)!= 0
} else{ //fine if $colonne <= $x
echo '</tr>';
}
echo '</table>';