['min_range' => 1]]) : false; $page = $page === false ? 1 : $page; $listingPath = isset($_SERVER['SERVER_NAME'], $_SERVER['REQUEST_URI']) ? phpb_full_url(phpb_current_relative_url(true)) : '/'; $pageResult = $postsRepository->getPageForListing($search, $page); $totalPages = max(1, (int) ceil($pageResult['total'] / \Plugi\Extensions\Blog\PostsRepository::POSTS_PER_PAGE)); if ($page > $totalPages) { $page = $totalPages; } $posts = $pageResult['posts']; $searchParameters = $search === '' ? [] : ['q' => $search]; ?>
1): ?>