Hello,
I'm trying to edit the style of a normal html table in Joomla/K2 that outputs the author, title of the article and date. The problem is (I thought joomla does this automatically) is that the header of the table keeps repeating on every new record.
I realized that I have to create the loop manually but how can I when there's not sql statement to fetch the data from the db.
This is the code, please help.
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td>Num</td>
<td>Title</td>
<td>Date</td>
</tr>
<tr>
<td class="sectiontableheader<?php echo $this->escape($this->params->get('pageclass_sfx')); ?>" align="right" width="5%">
<?php echo JText::_('Num'); ?>
</td>
<td class="sectiontableheader<?php echo $this->escape($this->params->get('pageclass_sfx')); ?>">
<?php if($this->item->params->get('catItemTitle')): ?>
<?php if ($this->item->params->get('catItemTitleLinked')): ?>
<a href="<?php echo $this->item->link; ?>">
<?php echo $this->item->title; ?>
</a>
<?php else: ?>
<?php echo $this->item->title; ?>
<?php endif; ?>
</td>
<?php endif; ?>
<td class="sectiontableheader<?php echo $this->escape($this->params->get('pageclass_sfx')); ?>" width="25%">
<?php if($this->item->params->get('catItemDateCreated')): ?>
<!-- Date created -->
<span class="catItemDateCreated">
<?php echo JHTML::_('date', $this->item->created , JText::_('DATE_FORMAT_LC2')); ?><?php endif; ?>
</td>
</tr>
</table>