Jump to content

goltoof

Members
  • Posts

    27
  • Joined

  • Last visited

Everything posted by goltoof

  1. Yes... I do know the difference between columns and rows :| Perhaps a visual will help you better understand: The module creates a list like this from $i++ and adds a break after each item so it's all in one <td> (column): <tr> <td> Category 1 Category 2 Category 3 Category 4 Category 5 Category 6 Category 7 Category 8 Category 9 Category 10 Category 11 Category 12 Category 13 Category 14 Category 15 Category 16 Category 17 Category 18 Category 19 Category 20 </td> </tr> (obviously this is all in a table) Instead I want it to look like this: <tr> <td> <td> <td> <td> Category 1 Category 6 Category 11 Category 16 Category 2 Category 7 Category 12 Category 17 Category 3 Category 8 Category 13 Category 18 Category 4 Category 9 Category 14 Category 19 Category 5 Category 10 Category 15 Category 20 </td> </td> </td> </td> </tr> <br><br> <tr> <td> Category 21 Category 22 etc.... </td> </tr> You see Categories 1-5 are in one <td> (one column) Categories 6-10 goes in the next column, etc, until it reaches 20 and breaks off into a new <tr> (a row) and the loop continues. I see your confusion, you're thinking that Category 1, 6, 11 and 16 are one row but that's not necessary. It could be set either way, sure, but it should be easier to just break off each 5 into a new <td> until 20 and then a new <tr> because it already adds a break after each list item. This is just a snippet of an enormously complex joomla module that I have no interest in making any more complex than it already is, except for what I'm trying to accomplish here, of course. Make sense.. at all?
  2. I'm modding a joomla module that displays a bunch of category titles in a row. Instead of it displaying all the titles in one row in one column I want it to break off after 5 or so and display the next 5 in another column and so on. What changes would I need to make to this block to accomplish this? <?php if ($this->params->get('se_toc_columns') == 2) : ?> <td class="setdtoc"> <ul> <?php $nLim = (int) (count( $this->categories ) / 2 + 0.5); for ($i=0, $n=count( $this->categories ); $i < $nLim; $i++) { echo $this->_getHtmlTocEntry($i); } ?> </ul> </td> <?php endif; ?> Additionally it would be great if I could get the list to break off into a new row after 20 links have been displayed (there are about 20 titles for it to display, but I might be adding more). But the first requirement is more important.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.