Problem with dompdf layout for list template heading

raper1987

New Member
Hi every one.
I will create new layout for dompdf i have a table with structure somthing like this:
HTML:
 |id | L.p. |Teczka| Sprawa          |
 | 1 | 1    | 7015 | asdasdasd       | 
 | 2 | 1    |  702 | asdasdassadasd  | 
 | 3 | 2    | 7015 | asdasdsfsdfdasd | 
 | 4 | 3    | 7015 | asdsdfsdfasdasd | 
 | 5 | 2    |  702 | asdafgdsfsdasd  | 
 | 6 | 3    |  702 | asdafsdfsdsdasd | 
 | 7 | 4    |  702 | asdsdfsdfasdasd | 
 | 8 | 4    | 7015 | asdsdfsdfasdasd |

for front-end i will create menu with prefilter for "L.p." example
for L.p.=7015

and data show somthing like this

HTML:
 |id | L.p. |Teczka| Sprawa          |
 | 1 | 1    | 7015 | asdasdasd       | 
 | 3 | 2    | 7015 | asdasdsfsdfdasd | 
 | 4 | 3    | 7015 | asdsdfsdfasdasd | 
 | 8 | 4    | 7015 | asdsdfsdfasdasd |

and my question is how to create layout where data from L.p. show in table head like this
HTML:
 |id | L.p. | Sprawa - 715    |
 | 1 | 1    | asdasdasd       | 
 | 3 | 2    | asdasdsfsdfdasd | 
 | 4 | 3    | asdsdfsdfasdasd | 
 | 8 | 4    | asdsdfsdfasdasd |

sorry for my bad English.

Mayby this is better example

test.png
 
Depending on what you need:
maybe you can use the "group by" in list "Data" settings.

Or you can create a custom list template.
 
The table that you see below is my own template . The problem is that I can not deal with selecting only one of the values ??from column to assign it to the header in DOMPDF. Data grouping is good, but I prefer to have a pre-filtered data and inserted as a separate menu in Joomla.
 
Answer for my problem turned out to be very simple
PHP:
            <?php
            foreach ($this->rows as $groupedby => $group) :
            $liczenie=0;
            foreach ($group as $this->_row) :
                if ($liczenie == 1) break;
                $opis = $this->_row->data->tec_teczka___oznacz_tec;
                $liczenie++;
            endforeach;
            endforeach;
            ?>
next i will use <?php echo $opis; ?> for show data in <th></th> tags.
 
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top