Hola,
Yo envio este mensaje porque no logro resolver un pequeno problema, resulta que necesito cambiar una lista de productos de la forma vertical a horizontal pero las tablas estan hechas en html y dentro el php no se si deberia de cambiar algo en php porque llevo meses intentando de vez en cuando y no tengo exito, ojala alguien me pueda asesorar para resolverlo.
gracias de antemano
JURITZI
Este es el codigo:
Código HTML:
<table border="0" cellspacing="3" cellpadding="3" width="100%" align="center" class="descri">
<?php
$conta = 1;
$languageName = ($language == 1) ? 'it' : 'en';
//$nomeLink = '/webSite/index?page=products&lang=' . $languageName;
$nomeLink = '/products/' . $languageName;
//$nomeLink = '/webSite/index/page/products/lang/' . $languageName;
foreach ($dbSchermi as $schermo):
$prodotto = strtoupper($schermo->getNome());
$nomeProdotto = ($language == 2) ? str_replace("ELLIPSE", "COMPACT", $prodotto) : $prodotto;
if ($conta / 2 != IntVal($conta /2)):
?>
<tr>
<td>
<?php echo link_to(image_tag(sprintf('%s/foto/prod_a%s.jpg', sfConfig::get('sf_w3s_absolute_images_path'), $schermo->getId()), 'size="100x100"') . '<br />' . $nomeProdotto, $nomeLink . '/' . strtolower($schermo->getEsSchermiTipi()->getNomeTipo()) . '/' . ucfirst($prodotto) . '.html', 'alt="' . $nomeProdotto . '"') ?>
</td>
<?php
else:
?>
<td>
<?php echo link_to(image_tag(sprintf('%s/foto/prod_a%s.jpg', sfConfig::get('sf_w3s_absolute_images_path'), $schermo->getId()), 'size="100x100"') . '<br />' . $nomeProdotto, $nomeLink . '/' . strtolower($schermo->getEsSchermiTipi()->getNomeTipo()) . '/' . ucfirst($prodotto) . '.html', 'alt="' . $nomeProdotto . '"') ?>
</td>
</tr>
<?php
endif;
$conta += 1;
endforeach;
?>
</table>
y el otro file es
Código HTML:
<table border="0" cellspacing="1" cellpadding="1" width="535" class="blue">
<tr>
<td valign="top" align="center" height="50" width="272">
<?php echo image_tag(sprintf('%sfoto_professional.gif', sfConfig::get('sf_w3s_absolute_images_path')), 'size="159x41"') ?><br /><br />
<?php include_component('schermi', 'disegnaSchermi', array('language' => $language, 'type' => 1)) ?></td>
<td valign="top" align="center" height="50" width="272">
<?php echo image_tag(sprintf('%sfoto_hometheatre.gif', sfConfig::get('sf_w3s_absolute_images_path')), 'size="159x41"') ?><br /><br />
<?php include_component('schermi', 'disegnaSchermi', array('language' => $language, 'type' => 2)) ?></td>
</tr>
<tr>
<td valign="top" width="272" class="descri"> </td>
<td valign="top" width="272" class="descri" > </td>
</tr>
</table>