PDF output of grouped list

bobede

Member
I have a list that has a number of different elements and often times it is useful to group the rows by a certain element. I have the list ungrouped by default but visitors on the front end can select to group by an element of their choice. I have the DOMPDF plugin installed and can produce PDF output of my list, however it defaults to the ordering of the list to the ungrouped state regardless of whether the front end display is showing grouped records or not. I experimented with adding a filter to the front end, and that does result in a PDF output of only the filtered records.

Is there a way to have the front end grouping apply to the PDF output in the same way that the filtering does?

Thanks.
 
You can create a custom template, edit default_buttons.php and add the group_by param to the PDF link
Around line 106 something like
Code:
if ($this->showPDF) :
    $groupby = JFactory::getApplication()->input->get('group_by','');
    $groupparam = $groupby == '' ? '' : '&group_by='.$groupby;?>
            <li><a href="<?php echo $this->pdfLink.$groupparam;?>" class="pdfButton">
                <?php echo FabrikHelperHTML::icon('icon-file', FText::_('COM_FABRIK_PDF'));?>
            </a></li>
<?php endif;
 

Members online

No members online now.
Back
Top