Здравствуйте, подскажите пожалуйста как правильно вывести таблицу в созданном node--produсt.tpl.php
<?php if($teaser): ?>
<table width="100%" border="1" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="10%"><center>Картинка</center></td>
<td width="70%"><center>Наименование</center></td>
<td width="10%"><center>Объем</center></td>
<td width="10%"><center>Цена</center></td>
</tr>
<tr>
<td><?php print render($content['field_image_produkt']); ?></td>
<td> </td>
<td> </td>
<td> </td>
</tr>
</table>
<?php else: ?>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td colspan="2" align="center" valign="middle"><center><strong><?php print strip_tags($title); ?></strong></center></td>
</tr>
<tr>
<td width="35%" align="center" valign="middle"><center><?php print render($content['field_image_produkt']); ?></center></td>
<td width="61%"><strong>Описание: </strong><?php print strip_tags(render($content['body'])); ?></br>
<strong>Объем: </strong><?php print strip_tags(render($content['field_size'])); ?></br>
<strong>Цена: </strong><?php print strip_tags(render($content['field_price'])); ?></td>
</tr>
</table>
<?php endif ?>
<table width="100%" border="1" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="10%"><center>Картинка</center></td>
<td width="70%"><center>Наименование</center></td>
<td width="10%"><center>Объем</center></td>
<td width="10%"><center>Цена</center></td>
</tr>
<tr>
<td><?php print render($content['field_image_produkt']); ?></td>
<td> </td>
<td> </td>
<td> </td>
</tr>
</table>
<?php else: ?>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td colspan="2" align="center" valign="middle"><center><strong><?php print strip_tags($title); ?></strong></center></td>
</tr>
<tr>
<td width="35%" align="center" valign="middle"><center><?php print render($content['field_image_produkt']); ?></center></td>
<td width="61%"><strong>Описание: </strong><?php print strip_tags(render($content['body'])); ?></br>
<strong>Объем: </strong><?php print strip_tags(render($content['field_size'])); ?></br>
<strong>Цена: </strong><?php print strip_tags(render($content['field_price'])); ?></td>
</tr>
</table>
<?php endif ?>
в тизере получаеться много записей и все отдельными таблицами
С уважением ZeUs
Комментарии
А список в ul li сделать не получается?
<li>Картинка</li>
<li>Наименование</li>
<li>Объем</li>
<li>Цена</li>
</ul>
В стили float: left; с отступом вогнать
А дивами остальное прописать?
не могу въехать все равно, один элемент выводит замечательно как надо, а вот список выводит каждый в своей таблице, как можно сделать по людски чтобы например открытие таблицы и закрытие выполнялось один раз в условии тизера, я так понял вьюха его вызывает столько раз сколько есть элементов (тизер не форматированный список)
ссылку в личку, посмотрю