freakedout

2 table layout

2 table layout

how can i achive with 2 table layout of categories?
i want it to be like that because the module position is too wide for the category module

Guest
Guest
useravatar
Offline
Administrator has disabled public posting

Re: 2 table layout

can you paste some quick hacks here? i would like to know and will implement it asap.

will subscribe to this thread.

Guest
Guest
useravatar
Offline
Administrator has disabled public posting

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!

Pete
Site admin
useravatar
Offline
758 Posts
User info in posts
Administrator has disabled public posting

Re: 2 table layout

wow! thank you for the super faaast reply!! will try it now

Guest
Guest
useravatar
Offline
Administrator has disabled public posting

Re: 2 table layout

You're welcome smile

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!

Pete
Site admin
useravatar
Offline
758 Posts
User info in posts
Administrator has disabled public posting