В данном коде есть фильтры, которые сортируют данные на странице. Необходимо применять фильтр dbtech_shop_sale (является значением eventtrigerid) сразу с загрузкой страницы Страница PHP: return array('macros' => array(), 'code' => function($__templater, array $__vars) { $__finalCompiled = ''; $__templater->pageParams['pageTitle'] = $__templater->preEscaped('Transactions'); $__finalCompiled .= ' '; $__templater->pageParams['pageH1'] = $__templater->preEscaped('Transactions'); $__finalCompiled .= ' <div class="block block--messages"> '; $__compilerTemp1 = ''; $__compilerTemp1 .= ' ' . $__templater->fn('page_nav', array(array( 'page' => $__vars['page'], 'total' => $__vars['total'], 'link' => 'dbtech-credits', 'params' => $__vars['filters'], 'wrapperclass' => 'block-outer-main', 'perPage' => $__vars['perPage'], ))) . ' '; if (strlen(trim($__compilerTemp1)) > 0) { $__finalCompiled .= ' <div class="block-outer"> ' . $__compilerTemp1 . ' </div> '; } $__finalCompiled .= ' '; $__vars['sortOrders'] = array('dateline' => 'Date', 'amount' => 'Amount', ); $__finalCompiled .= ' <div class="block-container"> <div class="block-filterBar"> <div class="filterBar"> '; $__compilerTemp2 = ''; $__compilerTemp2 .= ' '; if ($__vars['filters']['userid'] AND $__vars['userFilter']) { $__compilerTemp2 .= ' <li><a href="' . $__templater->fn('link', array('dbtech-credits', '', $__templater->filter($__vars['filters'], array(array('replace', array('userid', null, )),), false), ), true) . '" class="filterBar-filterToggle" data-xf-init="tooltip" title="' . 'Remove this filter' . '">' . $__templater->escape($__vars['userFilter']['username']) . '</a></li> '; } $__compilerTemp2 .= ' '; if ($__vars['filters']['currencyid'] AND $__vars['currencyFilter']) { $__compilerTemp2 .= ' <li><a href="' . $__templater->fn('link', array('dbtech-credits', '', $__templater->filter($__vars['filters'], array(array('replace', array('currencyid', null, )),), false), ), true) . '" class="filterBar-filterToggle" data-xf-init="tooltip" title="' . 'Remove this filter' . '">' . $__templater->escape($__templater->method($__vars['currencyFilter'], 'getTitle', array())) . '</a></li> '; } $__compilerTemp2 .= ' '; if ($__vars['filters']['eventtriggerid'] AND $__vars['eventTriggerFilter']) { $__compilerTemp2 .= ' <li><a href="' . $__templater->fn('link', array('dbtech-credits', '', $__templater->filter($__vars['filters'], array(array('replace', array('eventtriggerid', null, )),), false), ), true) . '" class="filterBar-filterToggle" data-xf-init="tooltip" title="' . 'Remove this filter' . '">' . $__templater->escape($__templater->method($__vars['eventTriggerFilter'], 'getTitle', array())) . '</a></li> '; } $__compilerTemp2 .= ' '; if ($__vars['filters']['order'] AND $__vars['sortOrders'][$__vars['filters']['order']]) { $__compilerTemp2 .= ' <li><a href="' . $__templater->fn('link', array('dbtech-credits', '', $__templater->filter($__vars['filters'], array(array('replace', array(array('order' => null, 'direction' => null, ), )),), false), ), true) . '" class="filterBar-filterToggle" data-xf-init="tooltip" title="' . 'Return to the default order' . '"> ' . $__templater->escape($__vars['sortOrders'][$__vars['filters']['order']]) . ' <i class="fa ' . (($__vars['filters']['direction'] == 'asc') ? 'fa-angle-up' : 'fa-angle-down') . '" aria-hidden="true"></i> <span class="u-srOnly">'; if ($__vars['filters']['direction'] == 'asc') { $__compilerTemp2 .= 'Ascending'; } else { $__compilerTemp2 .= 'Descending'; } $__compilerTemp2 .= '</span> </a></li> '; } $__compilerTemp2 .= ' '; if (strlen(trim($__compilerTemp2)) > 0) { $__finalCompiled .= ' <ul class="filterBar-filters"> ' . $__compilerTemp2 . ' </ul> '; } $__finalCompiled .= ' ' . $__templater->button('Filters', array( 'class' => 'filterBar-menuTrigger button--link', 'data-xf-click' => 'menu', 'aria-expanded' => 'false', 'aria-haspopup' => 'true', ), '', array( )) . ' <div class="menu menu--wide" data-menu="menu" aria-hidden="true" data-href="' . $__templater->fn('link', array('dbtech-credits', '', $__vars['filterActionParams'], ), true) . '" data-load-target=".js-filterMenuBody" > <div class="menu-content"> <h4 class="menu-header">' . 'Filters' . '</h4> <div class="js-filterMenuBody"> <div class="menu-row">' . 'Loading' . $__vars['xf']['language']['ellipsis'] . '</div> </div> </div> </div> </div> </div> <div class="block-body"> '; if (!$__templater->test($__vars['transactions'], 'empty', array())) { $__finalCompiled .= ' <div class="structItemContainer"> <div class="structItemContainer-group"> ' . $__templater->filter($__vars['transactions'], array(array('raw', array()),), true) . ' </div> </div> '; } else if ($__vars['filters']) { $__finalCompiled .= ' <div class="block-row">' . 'There are no transactions matching your filters.' . '</div> '; } else { $__finalCompiled .= ' <div class="block-row">' . 'There are currently no transactions to display.' . '</div> '; } $__finalCompiled .= ' </div> </div> '; $__compilerTemp3 = ''; $__compilerTemp3 .= ' ' . $__templater->fn('page_nav', array(array( 'page' => $__vars['page'], 'total' => $__vars['total'], 'link' => 'dbtech-credits', 'params' => $__vars['filters'], 'wrapperclass' => 'block-outer-main', 'perPage' => $__vars['perPage'], ))) . ' '; if (strlen(trim($__compilerTemp3)) > 0) { $__finalCompiled .= ' <div class="block-outer block-outer--after"> ' . $__compilerTemp3 . ' </div> '; } $__finalCompiled .= ' </div> '; $__templater->modifySidebarHtml('_xfWidgetPositionSidebarDbtechCreditsTransactionsSidebar', $__templater->widgetPosition('dbtech_credits_transactions_sidebar', array()), 'replace'); return $__finalCompiled; });