Jump to content

Search the Community

Showing results for tags 'Pagination'.

More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


  • Welcome to ProcessWire
    • News & Announcements
    • Showcase
    • Wishlist & Roadmap
  • Community Support
    • Getting Started
    • Tutorials
    • FAQs
    • General Support
    • API & Templates
    • Modules/Plugins
    • Themes and Profiles
    • Multi-Language Support
    • Security
    • Jobs
  • Off Topic
    • Pub
    • Dev Talk

Product Groups

  • Form Builder
  • ProFields
  • ProCache
  • ProMailer
  • Login Register Pro
  • ProDrafts
  • ListerPro
  • ProDevTools
  • Likes
  • Custom Development


There are no results to display.

Find results in...

Find results that contain...

Date Created

  • Start


Last Updated

  • Start


Filter by number of...


  • Start





Website URL







Found 73 results

  1. I use pagination modul. I have a field which has born year info. But I put the years with sign "-" for BC (Before Christ). my selector sorts like as text. -384, -4, -412 .. it must be: -412, -384, -4 selector: $pages=$page->children("limit=60, sort=date_field"); I want to order my pages like as php natsort function. thank you.
  2. Hi, I just wanted to check whether or not the following topic is still valid with respect to PW 3.x: https://processwire.com/talk/topic/22-how-to-build-a-news-page/ I am trying to integrate a news section into a basic multisite PW website installation (voluntary project) intended for a community of two villages. Currently there are 4 subdomains (hca-site, hfi-site, hhg-site, hps-site) that link back to the main domain website (https://thehanneys.uk) by clicking on their home buttons. I had a look at the Blog (ProcessBlog & MarkupBlog) module but it is not really what I'm looking for - a simple News section. At the moment we're just concentrating on getting the functionality in place. The styling can come later. The first issue encountered is that there is no checkbox under the Advanced section for "Page Numbers" to turn them on for the news-index template. Secondly, I don't understand why the following text is being displayed above the navigation when I expected it to be displayed after the page title. Thirdly, are the story pages displayed on the index page simply by creating a new child under News (page based on news-index.php template)? Showing 0 of 0 Article(s) | Page 1 of 0 The current code for the news-index.php template is as follows: <?php namespace ProcessWire; // basic-page.php template file // See README.txt for more information // Primary content is the page's body copy $content = $page->body; // If the page has children, then render navigation to them under the body. // See the _func.php for the renderNav example function. if($page->hasChildren) { $content .= renderNav($page->children); } // if the rootParent (section) page has more than 1 child, then render // section navigation in the sidebar if($page->rootParent->hasChildren > 1) { $sidebar = renderNavTree($page->rootParent, 3) . $page->sidebar; } // start the news stories list echo "<ul>"; // get the stories for this page $stories = $page->children("limit=6, sort=-date"); // note if you set the stories to sort by date descending on the /news/ page // in the admin, then you can omit the "sort=-date" above. // cycle through each story and print it in a <li> foreach($stories as $story) { echo " <li><a href='{$story->url}'>{$story->title}</a> <p><strong>Date:</strong> {$story->date}</p> {$story->body} </li> "; } echo "</ul>"; // get values for our placemarker headline $start = $stories->getStart(); $end = $start + count($stories); $total = $stories->getTotal(); $num = $input->pageNum; $lastNum = ceil($total / $stories->getLimit()); // output the placemarker headline echo "<h5>Showing $start - $end of $total Article(s) | Page $num of $lastNum</h5>"; // output pagination links echo $stories->renderPager(); The current code for the news-story.php template is as follows: <?php namespace ProcessWire; // basic-page.php template file // See README.txt for more information // Primary content is the page's body copy echo "<div id='bodycopy'>"; $content = $page->body; echo "</div>"; // If the page has children, then render navigation to them under the body. // See the _func.php for the renderNav example function. if($page->hasChildren) { $content .= renderNav($page->children); } // if the rootParent (section) page has more than 1 child, then render // section navigation in the sidebar if($page->rootParent->hasChildren > 1) { $sidebar = renderNavTree($page->rootParent, 3) . $page->sidebar; } P.S. Are there any books/tutorials specifically covering PW 3.x? Any assistance would be greatly appreciated.
  3. Hi. I've got a client that wishes to see all the page links in the rendered pagination, without the separator (...). Is this possible? I know the page links may get reeeeally long, but that's what he wants. I know there are optional arguments that can be passed to renderPager(), but I can't see one for removing the separator. Any suggestions folks?
  4. Hi, I am using pagination with ajax. When i click on any page number url not changing because of ajax call So when i click on page 3 and then click on page 7 i hit the back button it returns to page 1 because url never changing Here is my site: www.sediremlak.com For real estate sites if visitor find a property on page 4 and click on that property page. After click on back button site jumps to first page or home page not page 4 How can i fix this problem?
  5. Hello. I am working on a culinary web project where I am aiming at listing all recipes with a pagination after reaching the recipe limit. As far as I already did the pagination on another project, I was quite happy to use the code and see it in action. However, my joy was not lasting long as far as the present pagination HTML code differs from the other and I was scratching my head today for several hours and yet no solution to precisely match the styling. I was able to apply the pagination, show the prev/next and numbers properly, however the active class is not applied properly and the design has the prev/next arrows at the both ends of the recipe block (image attached). Here is the pagination original html code: <!-- Pagination --> <div class="sixteen columns"> <div class="pagination-container"> <nav class="pagination"> <ul> <li><a href="#" class="current-page">1</a></li> <li><a href="#">2</a></li> <li><a href="#">3</a></li> </ul> </nav> <nav class="pagination-next-prev"> <ul> <li><a href="#" class="prev"></a></li> <li><a href="#" class="next"></a></li> </ul> </nav> </div> </div> And here is my pagination code (after making sure that the template pagination is enabled): <div class="sixteen columns"> <div class="pagination-container"> <?php echo $result->renderPager(array( "nextItemLabel" => __(">>"), "previousItemLabel" => __("<<"), "currentItemClass" => "current-page", 'listMarkup' => "<nav class='pagination'><ul>{out}</ul></nav>", 'itemMarkup' => "<li>{out}</li>", 'linkMarkup' => "<a href='{url}'>{out}</a>" )); ?> <nav class="pagination-next-prev"> <ul> <li><a href="#" class="prev"></a></li> <li><a href="#" class="next"></a></li> </ul> </nav> </div> </div> As far as the pagination active class is not applied on the <li> but on the <a href... > I tried to change the linkMarkup to: 'linkMarkup' => "<a href='{url}' class='{class}'>{out}</a>" however that shows that the {class} is not applied with linkMarkup but with itemMarkup. Tried to add the class to itemMarkup too, but the same result is showing. For sure the navigation is not an issue if it is next to the numbers, however I wanted to attempt to match fully the style and learn how can I move the prev and next pointers away from there or in other words to match the original theme. So any ideas how to achieve the proper functionality and obtain the previous/next page links? I read so many tutorials and manuals today mentioning to use prev() and next() but in my case the results are not coming from $page and the next page pointed to the next page in my admin but not the next results page.
  6. Hello PW community, I've a search form which return selected items with pagination. Everything works fine, also the pagination display correctly all results through pages. The issue is given only for selected results pagination as the latter does not start from page 1 but it revert back results from the current page (e.g. if you are in page 3, and submit a result from selects form, than all related items are displayed - not starting from page 1 but from page 3, which means something a fake "no results"). This is the classic function of render pager: echo $works->renderPager(array('arrayToCSV' => false)); Any idea? Thanks! Edit: I've also tried the "start=0" within the selectors, however it Always re-start from page 1 and stick to that, regardless. So no more option to move to page 2, 3, ....
  7. I was wondering how to achieve the following. A total of 100 pages which are listed with a limit of 10 items per page, resulting in 10 pages of 10 items. Instead i desire the following (below), and wondering how to setup the code / selector(s). The first page should show a list of 8 items. After that all following pages should have a limit of 10 items. page 1 -> items 1 - 8 -> (limit 8) page 2 -> items 9 - 18 -> (limit 10) page 3 -> items 19 - 28 -> (limit 10) ... page 9 -> items 79 - 88 -> (limit 10) page 10 -> items 89 - 98 -> (limit 10) page 11 -> items 98 - 100 -> (limit 10) The ideal situation would be to have an extra page selector property aside of 'limit', something named 'limit_first' or alike.
  8. Hello All, I have setup a blog and added pagination to it with Pager (Pagination) Navigation I have followed the Docs. However when I click on the next page the page just reloads but the blog posts do not change. news/?page=2 etc is added to the URL but the results stay the same any ideas? The code Iam using is below. Cheers Jon <?php $results = $pages->find("template=news-item|news-item-right-gallery, limit=2, sort=-news_date"); $pagination = $results->renderPager(); foreach($results as $result) {?> <div class="news-article"> <div class="row"> <div class="medium-3 columns"> <?php if($result->single_image) $large = $result->single_image->width(150); $small = $result->single_image->width(590); echo "<img data-interchange='[{$small->url}, small], {$small->url}, medium], {$large->url}, large]'>";?> </div> <div class="medium-9 columns"> <?php echo "<h2><a class='title' href='{$result->url}'>{$result->title}</a></h2>"; echo "<p class='published'><i class='fa fa-calendar' aria-hidden='true'></i> On - {$result->news_date}</p>"; if ($result->excerpt) { echo $result->excerpt; }else{ echo $result->body; } ?> <a href="<?php echo $result->url ?>" class="button small">Read More</a> </div> </div> </div> <?php } echo $pagination; ?>
  9. Good day! Suddenly I stumbled upon pagination once again. Pagination itself works as expected, but renderPager() returns the same markup on every paginated page. So it is 1st page current on every /pageN/. What can cause this? Please help.
  10. Hello, I'm new to PW and need some help. I created a simple gallery which is working fine, but I can't figure it out how to create some styling for pagination. I use this for pagination: <?= $a->renderPager() ?> My html look like this: <div class="numeric-pagination"> <a href="#" class="button"><i class="icons icon-left-dir"></i></a> <a href="#" class="button">1</a> <a href="#" class="button active-button">2</a> <a href="#" class="button">3</a> <a href="#" class="button"><i class="icons icon-right-dir"></i></a> </div> I hope you understand what I want to create. Thank you R
  11. Hi Guys This is possibly a stupid question but I can't get it to work. How can I limit the max number of pages I get and paginate them afterwards with a different limit(per pagination page)? Lets say I have a total of 1000 Events. I want to output 100 Events (10 Events per pagination page). // outputs 10 events per page but returns all 1000 events - how pagination works default $items = $pages->find("template=event, limit=10"); // should output 10 events per page but should only use the 100 latest events for output - doesn't work // Try 1 $items = $pages->find("template=event, limit=100")->find("limit=10"); // Try 2 $items = $pages->find("template=event, limit=10, getTotal=100"); // output pager echo $items->renderPager(); Can someone clarify that to me? Greetings Orkun
  12. Hello I am using a dynamically created Pagination like: $allImages = $page->VitrineImages; $limit = $page->VitrineImageCount; $start = ($input->pageNum - 1) * $limit; $images = $page->VitrineImages->slice($start, $limit); $total = count($page->VitrineImages); $a = new PageArray(); foreach($images as $unused) $a->add(new Page()); $a->setTotal($total); $a->setLimit($limit); $a->setStart($start); this works fine in the template file to create Pagination in relation to the number of images for that field in the page. But I have problems to include that inside a sitemap template (I am using the code from here -> https://processwire.com/talk/topic/3846-how-do-i-create-a-sitemapxml/?page=1 ) It doesn't create anything when I use the same code in the sitemap.php only replacing the $page variable with $homepage which is defined in _init.php (which is prepended for the sitemap template - and it's inside the $homepage page where I use the pagination in that way) It seems I am missing something (kind of new to processwire) because $a is always 0 when using this code in my sitemap.php file...
  13. TL;DR How to change a paginated URL so it reads "example.com/foo/2/" instead of "example.com/foo/page2/"? Excuse me if this is the wrong place to post this (in which case please move this to the right forum), or this has been asked before... but how do you remove the "page" prefix in a paginated url so that it reads something like "example.com/foo/1/" instead of the default of "example.com/foo/page1/"? I know that for any other type of prefix, I can just override $config->pageNumUrlPrefix in site/config.php, but I can't figure out how you'd do it if you simply want an effectively "blank" prefix. I've tried setting $config->pageNumUrlPrefix = '' but that ends up breaking pagination altogether or the page prefix ends up in the URL instead. The only way I can think of doing this is actually changing the line: if(!$pageNumUrlPrefix) $pageNumUrlPrefix = 'page'; to if(!$pageNumUrlPrefix) $pageNumUrlPrefix = ''; but tampering a module file seems bad practice and so I am looking for a better way to achieve this. Help a ProcessWire noob out!
  14. I'm just looking at trying to modify the output of the renderPager function. Instead of <li> for the page numbers, we need a select menu. Is it possible to modify the HTML that is returned or will I need to write my own function? Historically I would have used some form of override (Joomla) or inheritance to achieve this. What is the best way to 'build' on the PW core rather than rewrite it? What we're looking to achieve is have a dropdown rather than the intermediary numbers e.g. 1 ~ DROPDOWN ~ LASTPAGE
  15. Hi, I have some pagination on my page, which is pretty bog standard. $allChildren = $page->find('template=blog-article, limit=10, sort=-article_date'); The limit is set to 10 as I want to show them 10 articles at a time. The articles are displayed side by side, so there is 5 rows of 2 article. I am using infinite scroll plugin (which doesn't really matter). However the first article is a featured article and displays full width, so this leaves me with an odd article at the end. - - - (1) - - - - (2) - (3) - - (4) - (5) - - (6) - (7) - - (8) - (9) - - (10) So really I need the first page to show 11 and then on other pages for it to be 10. - - Page 1 - - - - - (1) - - - - (2) - (3) - - (4) - (5) - - (6) - (7) - - (8) - (9) - - (10) (11) - - - Page 2 - - - (12) (13) - - (14) (15) - - (16) (17) - - (18) (19) - - (20) (21) - - - Page 3 - - - (22) (23) - - (24) (25) - - (26) (27) - - (28) (29) - - (30) (31) - Is this possible? Any pointers would be much appreciated! Thanks, Craig
  16. Hi, Run into a bit of an issue with pagination on a site I am working on. I am sure the answer is really simple, but struggling to figure out what's going wrong. I have a bunch of articles, but I only want the ones where the date is less than the current date. I then want to limit the array so that I can paginate it. <?php $allNews = $page->children("template=news"); $oldNews = new PageArray(); foreach($allNews as $article) : if(strtotime($article->date) <= strtotime('now')): $oldNews->import($article); endif; endforeach; $oldNews = $oldNews->find('limit=2, sort=date'); echo $oldNews->renderPager(); foreach ($oldNews as $article) : ... endforeach; ?> The limit is being applied, however I don't see any pagination and navigation to the different pages returns the same first two articles. Any help would be much appreciated. Thanks, Craig
  17. One of my blogs seems to be accessible from multiple URLs and it's affecting my clients SEO. For example, using the following URL structures, I can access the same page. http://www.domain.not/blog/page2/ http://www.domain.not/blog/posts/page2/ The correct one is probably the second one as all posts are children of blog. My actual blog structure is as follows Blog - Posts -- Post A -- Post B -- Post C (etc) - Tags - Categories I have pagination enabled on a template called blog-posts which is applied to the Posts page. I'm not sure though why the double URL is occouring?
  18. Hi folks, I am using pagination on a news overview on my site. I have three queries set up on this page; a display first post, a display the next six (excluding the first) and then everything else (so excluding the first and the next six); so in theory the part I want to paginate starts at post 7 onwards. The only issue I have is when I click to the next page (page2) it shows the first post, the next six, then everything else, again. I understand why this is happening... it is using the same template for page2, page3 etc etc, which includes those queries. Below is my entire setup. Is there any way around this? I've tried using 'start' positions etc but doesn't seem to work properly. http://snippi.com/s/4ze4c4u (this is my entire setup for the news page) Any help or ideas? Many thanks.
  19. Full disclosure: I'm starting in ProcessWire after having used MODX almost exclusively for the last four or five years. I still tend to think in terms of the parameters that I can set in a function call and, frankly, my knowledge of php has degenerated thanks to every need pretty much being covered by the snippet library there. I am trying to familiarize myself with ProcessWire by coding a simple gallery site (to work my way up to more complex sites as I get more comfortable). I've been able to look up everything I need between the cheat sheet, wiki and the existing forum topics until today. I have finally stumbled into something I can't quite work out (and can't figure out keywords with which to search). Staging site, the gallery in question: http://www.creativejay.com/xine/portfolio/ (I haven't finished setting up fancybox, that's fiddly stuff for later) In the portfolio I have three albums currently. Since these galleries will only grow, I want to add pagination now. I understand how to paginate with MarkupPagerNav and find(), which is how I retrieve the albums themselves, but the individual images in the album are retrieved with a double scoop of foreach. Here's the entire code of my function at the moment: <?php function galleryMain(){ $albums = wire("pages")->find("has_parent=/albums/"); echo "<div class='albumgrid'>"; $out =""; foreach($albums as $album) { $albumimages = $album->gallery; $thumbsize = 140; foreach ($albumimages as $albumimage) { $out .= "<a href='{$albumimage->url}' title='{$albumimage->description}' class='fancybox-button' rel='fancybox-button'>"; $out .= "<img src='{$albumimage->size($thumbsize, $thumbsize)->url}' style='margin-right: 15px; margin-bottom:25px; border: solid 1px #000000;' height='{$thumbsize}' width='{$thumbsize}'>"; $out .= "</a>"; } echo $out; } echo "</div>"; } ?> So what's happening above (as I understand it) is that it's fetching the children of /albums/ which results in three albums. It runs through each one "as $album" and within that it runs through all the items in the album's $gallery field, then loops back and repeats for each album. If I add my pagination limit in the initial find() call, it's actually just limiting the number of albums display. Since my desired thumbnail limit is 30 per page and there are three albums this is moot (aside from not being what I want). If I were to limit within the "as $album" call, or deeper, would it not limit the items displayed from each album, but not necessarily result in pagination in the resulting web page that would lead me to additional pages of thumbnails? So my question is: What syntax (and where) do I use to paginate the code above to display a maximum of 30 gallery thumbnail images, total, from three albums per page? Ideally I'd also like to order them so that the newest images appear first, exclusive of what album they are from. I should note I'm following the gallery tutorial from the wiki and I am more than happy to use different code in my function entirely if it achieves the goal more directly. Thanks a bunch in advance!
  20. Let's say I have 500 Eventpages or more with differen content fields(date, title, textarea etc..). I would display all events in a list like this: $events = $pages->find("template=event, limit=10"); echo "<div class='event-container'>"; foreach($events as $event){ echo "<div class='event-detail'> <h1>$event->title</h1> <p>$event->short_description</p> </div>"; } echo "<a class='load-more'>LOAD MORE</a>"; echo "</div>"; Now I want to make the load-more link to display 10 or 20 more events without reloading the page and showing a loading gif/text while its rendering the other events, when clicking on it . How can i achieve this? I know that i could use pagination for displaying this heavy amount of results but the customer doesn't want that because it don't fit in the design of the website. Can I probably achieve a combination with Pagination and Ajax, or are there other ways to do it?
  21. Hi folks, I'm wondering if it is possible to create Previous/Next links between pages that only have a certain checkbox ticked? I have a Projects > each project structure setup, and if the user checks for a project to be a case study, it generates some new/different fields in the backend. What I'm after is to be able to have Previous/Next links per project that only cycles through the case studies... not all the projects. Here below is my code that works for ALL projects but not just CASE STUDY projects. Thanks for your time, R <?php /* $page->project_casestudy_check === 1 */ ?> <div class="project-casestudy-pagination-container clearfix"> <div class="container-fluid"> <div class="row"> <div class="col-xs-12 col-sm-12"> <?php if ($page->prev->id) : ?> <div class="prev-project-container"> <a class="prev-project" href="<?php echo $page->prev->url; ?>"><span>Previous Project</span></a> </div> <?php else : ?> <div class="prev-project-container"> <a class="prev-project" href="<?php echo $page->siblings->last->url; ?>"><span>Previous Project</span></a> </div> <?php endif; ?> <?php if ($page->next->id) : ?> <div class="next-project-container"> <a class="next-project" href="<?php echo $page->next->url; ?>"><span>Next Project</span></a> </div> <?php else : ?> <div class="next-project-container"> <a class="next-project" href="<?php echo $page->siblings->first->url; ?>"><span>Next Project</span></a> </div> <?php endif; ?> </div> </div> </div>
  22. Hi folks, I've set up some infinitescroll on manual trigger on a Journal section of my site, all fine and set up, but there's a slight issue that the 'Allow Page Numbers' isn't returning a 404 even when there isn't more 'pages'. So, the infinitescroll never fails... or stops. For example, I have a /journal/page1 which is fine, and has posts, and a /journal/page2 but then, technically, /journal/page3 shouldn't exist as all the last post is on page2, but even if I put /journal/page99 it still returns a page, rather than a 404. Looking at the tutorials, this is even the same for the tutorial: https://processwire.com/docs/tutorials/how-to-use-url-segments/page99 I know I need to build a throw new Wire404Exception(); into my template, but I am unsure how to manage this? Any thoughts? Thanks! R
  23. Hi fellow PW people. This is my 1st time posting here. Being a html and css front-end guy I’m virgin to CMS development but picking up the art of programming fast thanks the user intuitive and friendly ProcessWire which ended up being my CMS of choice after a month of experimenting among several. I’ve finally been presented with my first ‘unable to figure out’ problem… Ive been trying to tackle my head around a pagination problem. I am able to output the pagination however when you click on ‘page 2’ it directs to that page in the url, but the results don’t update. 'Page 2' outputs the results of 'page 1'. Also the navigation link stays on 'page 1' and the previous button don’t show. I have read through the API docs and also consulted other forum posts relating to pagination, trying out various different options to no avail. I have also enabled pagination in the templates used by the output pages. So I’m left scratching my head hoping some clever PW pro can help me figure this out. Below is the code used for the output. <?php foreach($results = $page->children("limit=6") as $child) echo " <div class=\"cottage-listing\"> <div class=\"image\"> <img src=\"{$config->urls->templates}/styles/images/examplecottage.jpg\" alt=\"Image of [cottage_name], [cottage_area]\"> </div> <div class=\"description\"> <p> <span class=\"cottage\"><strong>$child->title </strong>$page->title, {$page->parent->title} </span> <span class=\"information\">[cottage_summary] - Limited to 120 Chars</span> </p> </div> <div class=\"info\"> <span class=\"price\"><strong>from: £121</strong>per night</span> <dl> <dt>Type: </dt> <dd>{$child->cottage_type->title} | {$child->cottage_catering->title}</dd> <dt>Sleeps:</dt> <dd>{$child->cottage_sleeps}</dd> <dt>Rooms:</dt> <dd>{$child->cottage_bedrooms}</dd> </dl> <a href=\"{$child->url}\" class=\"button\">More Details</a> </div> </div> "; ?> <?php $pagination = $results->renderPager(array( // Controls the output of the pagination links 'nextItemLabel' => "»", 'nextItemClass' => "", 'previousItemLabel' => "«", 'previousItemClass' => "", 'listMarkup' => "<ul class='pagination'>{out}</ul>", 'itemMarkup' => "<li class='{class}'>{out}</li>", 'linkMarkup' => "<a href='{url}'>{out}</a>", 'currentItemClass' => "current", 'firstItemClass' => "", 'firstNumberItemClass' => "", 'lastNumberItemClass' => "", 'lastItemClass' => "" )); if ($pagination ==""){ echo ""; } else { echo "<div class=\"pagination-centered\"> $pagination</div>"; } ?> Any suggestions are welcome. It is probably something stupid staring me in my face, but after several hours trying to figure it out myself I'm turning to the super supportive forum before I start pulling my hair out (what's left of it) .
  24. Hi guys, am I doing something wrong? I get this selector $appuntamenti_privati = $pages->find("template=appuntamento_privato|appuntamento_cinema|appuntamento_cultura|appuntamento_gusto, start=11, limit=10, sort=-date, sort=title"); and then i get this at the end of the page <?php echo $appuntamenti_privati->renderPager(); ?> and i get a pagination rendered but it doesn't work correctly. I have only and always the "Prev"and it's always linked to page2 and, above all, every page shows always the same results (the first ten results). I can't get were the problem is. Thanks!
  25. Hi folks, I'm set up a simple next/prev between pages that are loaded in via pjax with the following: <?php if ($page->next->id) : ?> <div class="next-solution-container"> <a data-pjax class="next-solution" href="<?php echo $page->next->url; ?>"><span><?php echo $page->next->title; ?></span></a> </div> <?php endif; ?> This worked great, but I want it now to loop... so if it's the last item, it gets the first item as the next link. I thought the following below would work, but as I am using it on the page template, and thus using $page, I don't think first/last are in use? <?php if ($page == $page->last) : ?> <div class="next-solution-container"> <a data-pjax class="next-solution" href="<?php echo $page->first->url; ?>"><span><?php echo $page->first->title; ?></span></a> </div> <?php else : ?> <div class="next-solution-container"> <a data-pjax class="next-solution" href="<?php echo $page->next->url; ?>"><span><?php echo $page->next->title; ?></span></a> </div> <?php endif; ?> Any thoughts?
  • Create New...