PdoTools(ajaxMode) для таблицы

Сделал вывод дополнительных ячеек таблицы по кнопке показать еще:
<div id="pdopage" class="jet-cost-table">
                        [[!+page.nav]]
                         <div class="rows table-list table-list-more">   
                                <table>
                                    <thead>
                                        <tr>
                                            <th>[[++cultureKey:is=`ru`:then=`Город назначения`:else=`City of Destination`]]</th>
                                            <th>[[++cultureKey:is=`ru`:then=`Стоимость`:else=`Cost`]]</th>
                                        </tr>
                                    </thead>
                                    <tbody>
                                    [[!pdoPage?
                                        &parents=`[[++cultureKey:is=`ru`:then=`10841`:else=`14937`]]`
                                        &sortby=`menuindex`
                                        &sortdir=`ASC`
                                        &tpl=`charterCostList`
                                        &ajaxMode=`button`
                                        &includeTVs=`cost`
                                        &limit=`10`
                                        &ajaxTplMore=`@INLINE <button class="button btn-default btn-more">[[++cultureKey:is=`ru`:then=`Показать еще`:else=`Show more`]]</button>`
                                    ]]
                                    </tbody>
                               </table>
                        </div>
                    </div>
Шаблон:
<tr>
    <td>[[+pagetitle]]</td>
    <td>[[+tv.cost]]</td>
</tr>

Все работает, но с ajax новые tr td грузяться вне table, верстка едет:

Как сделать так, чтобы все грузилось в пределах одной table?
Виноградов Тимур
10 декабря 2020, 19:54
modx.pro
630
0

Комментарии: 2

Alexey
10 декабря 2020, 21:02
0
Привет! Класс rows нужно дать тегу tbody, а не table-list
Авторизуйтесь или зарегистрируйтесь, чтобы оставлять комментарии.
2