diff --git a/snippets/init.php b/snippets/init.php new file mode 100644 index 0000000..a125c4a --- /dev/null +++ b/snippets/init.php @@ -0,0 +1,7 @@ + $_SERVER['DOCUMENT_ROOT'].'/.tpl' // where to look for templates +)); +//Beatrix::view()->addFolder('email', ''); \ No newline at end of file diff --git a/snippets/template/footer.php b/snippets/template/footer.php new file mode 100644 index 0000000..a2c0394 --- /dev/null +++ b/snippets/template/footer.php @@ -0,0 +1,3 @@ +sectionsDefaults([ + // empty default sections + '/' => [ + 'sidebar.left.top' => '', + 'sidebar.left.middle' => '', + 'sidebar.left.bottom' => '', + 'sidebar.right.top' => '', + 'sidebar.right.middle' => '', + 'sidebar.right.bottom' => '', + ], + // any sub-page has left menu + '/.+' => [ + 'sidebar.left.top' => ['layout/snippets/sidebar-menu-left'], + ], + // but not in search page + '/search/?.+' => [ + 'sidebar.left.top' => '', + ] +]); diff --git a/src/templates/bootstrap/pagination.php b/templates/bootstrap/pagination.php similarity index 84% rename from src/templates/bootstrap/pagination.php rename to templates/bootstrap/pagination.php index ee0ec3f..3a48bd2 100644 --- a/src/templates/bootstrap/pagination.php +++ b/templates/bootstrap/pagination.php @@ -10,7 +10,6 @@ * @var $showStartEndArrows * @var $showArrowsWhenInactive * @var $size null | 'sm' | 'lg' - * @var CAllDBResult $result * * auto-computed vars * @var bool $isPrevArrowActive @@ -41,11 +40,11 @@ $startUrl = str_replace('__PAGENUMBER__', 1, $urlStartTemplate); $prevUrl = str_replace( '__PAGENUMBER__', - $result->NavPageNomer - 1, - ($result->NavPageNomer == 2 ? $urlStartTemplate : $urlTemplate) + $pageNumber - 1, + ($pageNumber == 2 ? $urlStartTemplate : $urlTemplate) ); -$nextUrl = str_replace('__PAGENUMBER__', $result->NavPageNomer + 1, $urlTemplate); -$endUrl = str_replace('__PAGENUMBER__', $result->NavPageCount, $urlTemplate); +$nextUrl = str_replace('__PAGENUMBER__', $pageNumber + 1, $urlTemplate); +$endUrl = str_replace('__PAGENUMBER__', $pageCount, $urlTemplate); ?>