- Index
- » Support
- » Categories module extended
- » 2 table layout
2 table layout
Re: 2 table layout
Hello Aniphreak,
That's something we might consider for the next version. Thanks for the input.
As a quick hack you can edit the file modules/mod_categories/tmpl/default.php
Replace everything after line 14 (line 15 to the end) with this code:
<table class="mod_cat<?php echo $params->get('moduleclass_sfx'); ?>">
<?php
$i=0;
foreach ($list as $item) :
if ( $i%2 == 0 ) {
echo '<tr>';
}
?>
<td>
<a href="<?php echo JRoute::_(ContentHelperRoute::getCategoryRoute($item->id,'')); echo $display_mode;?>">
<?php echo $item->title;?>
<?php if ( $display_count ) { echo ' ('.$item->cnt.')'; } ?>
</a>
</td>
<?php
if (!$list[$i+1]) { echo ' <td></td>'; }
if ( $i%2 != 0 ) {
echo '</tr>';
}
$i++;
endforeach;
?>
</table>
Please note that this will make the included styles not work anymore! You must adjust one of the css files to fit your needs. Select style 1 in the module configuration and edit the file modules/mod_categories/style1.css for example.
Kind regards,
Pete
If you are satisfied with our products please write a review in the Joomla Extensions Directory!
Re: 2 table layout
You're welcome 
Please copy the code again! I added another line because at first I didnt think of uneven amounts of categories. In this case there would be a table cell missing (which works fine in Firefox but I dont expect it to work well in IE).
Cheers
If you are satisfied with our products please write a review in the Joomla Extensions Directory!
- Index
- » Support
- » Categories module extended
- » 2 table layout








