Needed to limit the number of items per row, don't know if this is the better way:
File: tablegroup_plugin_style_tablegroup.inc
Line 12:
$options['items_per_row'] = array('default' => 1);
Line 65:
$form['items_per_row'] = array(
'#type' => 'textfield',
'#title' => t('How many items per row?'),
'#default_value' => $this->options['items_per_row'],
);
Line 87:
+ $x = 0;
foreach ($rows as $row_header => $row) {
+ if(sizeof($row) > $this->options['items_per_row']){
+ $howmany = sizeof($row) - $this->options['items_per_row'];
+ for($x = 0;$x<$howmany;$x++)
+ array_pop($row);
+ }
If there is a better way to do it, please let me now.
Thanks
Comments
Comment #1
becw commentedWhat kind of output are you trying to get? Do you want a single item in each table cell? A single column in each row?
Comment #2
hlopes commentedNah, just a table with rows grouped by taxonomy and columns by post date.
It's just that i was having problems with the maximum number of items in each row.
Example:
9 articles in a website
6 with taxonomy term "People & Arts"
3 with taxonomy term "Science & Technology"
and i want five columns per row tops.
I've added some other options to the module, as shown in the image attached.
It's not the best implementation, but it's workin! :D
If you find them useful, i can post the code here.