salve ragazzi sono disperato non sto trovando una soluzione al lavoro che sto facendo mi potreste dare una mano ho iniziato a provare di capire smarty la classe di template adesso il problema e questo e da database prendo dati icone e link adesso io passo a smart sti dati ma smart me li vede tutti uguali vi spiego meglio io tramite select prendo i dati a posizione 1 posizione 2 ecc adesso pero se io metto il riavato da databae smarty me li vede ome un unio vaore posto l index.php
Codice PHP:
$caric_blocks_home = mysql_query("select * from blocks_home where posizione ='3' and enable ='1' limit 1");
while($array=mysql_fetch_array($caric_blocks_home)){
$posizione = $array['posizione'];
$smarty->assign("posizione","$posizione " );
$smarty->assign("img_icon","".$array['img']."" );
$smarty->assign("path_content","".$array['path']."");
$smarty->assign("title_content",constant("".$array['nome'].""));
$smarty->assign("descrict_content",constant("".$array['description'].""));
}
$caric_blocks_home = mysql_query("select * from blocks_home where posizione ='4' and enable ='1' limit 1");
while($array=mysql_fetch_array($caric_blocks_home)){
$posizione = $array['posizione'];
$smarty->assign("posizione","$posizione " );
$smarty->assign("img_icon","".$array['img']."" );
$smarty->assign("path_content","".$array['path']."");
$smarty->assign("title_content",constant("".$array['nome'].""));
$smarty->assign("descrict_content",constant("".$array['description'].""));
}
qua prendo i dati da due posizioni differenti la 3 e la 4
e questo e il tpl files
ho provato cosi
codice:
{if $posizione =="2"}
<table id='contenutitexticone'>
<tr>
<td id='iconticket'> <a href ="{$path_site}/{$path_content}index.php" target="_parent">[img]{$path_site}/immagini/{$img_icon}.gif[/img]</a> </td>
<td id='titlemessage'><a href ="{$path_site}/{$path_content}index.php" target="_parent">{$title_content}</a>
<span class='smalltext'>{$descrict_content}</span> </td>
</tr>
</table>
{/if}
</td>
</tr>
<tr>
<td>
<table id='contenutitexticone'>
<tr>
<td id='iconticket'> <a href ="{$path_site}/{$path_content}index.php" target="_parent">[img]{$path_site}/immagini/{$img_icon}.gif[/img]</a> </td>
<td id='titlemessage'><a href ="{$path_site}/{$path_content}index.php" target="_parent">{$title_content}</a>
<span class='smalltext'>{$descrict_content}</span> </td>
</tr>
</table>
ma senza arrivar ad una conlusione