Jump to content

Search the Community

Showing results for tags 'next'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • 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

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Location


Interests

Found 6 results

  1. 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>
  2. Hi all, I have the following simple code for next/previous links on article pages: <!-- Next article --> <?if($page->next->id) { ?><i class="icon-chevron-left"></i> <a href="<?echo $page->next->url; ?>"> <?=${'previous_'.$countryCode}; ?></a><? } ?> <!-- /Next article --> <!-- Previous article --> <?if($page->prev->id) { ?> <a href="<?echo $page->prev->url; ?>"><?=${'next_'.$countryCode}; ?></a> <i class="icon-chevron-right"></i> <? } ?> <!-- /Previous article --> It all works correctly but there's a certain type of article I need to exclude from the next/previous links (any page that has options field 'content_type' with a value of '6'). I'm trying to figure out a way to get 'next' and 'previous' but if 'content_type' on that page has a value of '6' then skip it. Can anyone help with some clues on how this might be done? I've had a look at using the pagination code as well as looking at grabbing 'siblings' and filtering them but come to a dead end. Thanks!
  3. 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?
  4. I am setting up some simple pagination for a page, and want to use the $page->next or $page->prev functions. Everything works as I want, except for one part – checking whether a next/prev page exists or not. So, for example, this works within my code <?php if ($page->next->journal_featured_image) : ?> but if I wrapped the whole section in <?php if ($page->next) : ?> it doesn't seem to make any difference. I tried count too... but no use. Any ideas? Thanks, R
  5. Does anyone know how to translate properly the words "Prev" and "Next" that are rendered with Processwire's paginator feature? Thanks!
  6. Hi, I'm setting up some next/prev page linking code. I only want those links to show if the page's publish_date field is less than today. Here's my convoluted and cobbled-together code: <?php $today = time(); if($page->prev->getUnformatted('publish_date')<$today) echo "<li id='prev'><a rel='nofollow' title='{$page->prev->title}' href='{$page->prev->url}'>{$page->prev->title}</a></li>"; if($page->next->getUnformatted('publish_date')<$today) echo "<li id='next'><a rel='nofollow' title='{$page->next->title}' href='{$page->next->url}'>{$page->next->title}</a></li>"; Firstly, is there a way to simplify this? Secondly, if there's no value returned for the previous page (for example) it still outputs the HMTL. ie: <li id='prev'><a rel='nofollow' title='' href=''></a></li> Thanks for any help. Cheers Marty
×
×
  • Create New...