Home » Topics » Pods 1.x » Disappearing Navigation/Pod results after clicking into the pagination
Disappearing Navigation/Pod results after clicking into the pagination
This topic contains 4 replies, has 4 voices, and was last updated by entalpia 1 week, 3 days ago.
-
AuthorPosts
-
April 15, 2011 at 7:53 pm #165590
http://www.dpddesign.com/wordpress/portfolio/
I have a pod looping and showing all the navigation for the photo categories at right side of page (Homes, Kitchen, etc.)
Works fine, until you click on Homes, then pick a ‘paginated’ page number in the white area. Once you click on the 2nd, 3rd page, that Pod-navigation at right disappears completely.
Any ideas? Here is the Pods code for the right-side navigation (pretty standard, I think), and below that the "Part 2" code for the image thumbnails that come into the white area (probably less standard – I did my best):
Part 1
123456789101112131415161718192021222324252627282930313233343536<?php$category = new Pod('category');$category->findRecords('name DESC');$all_categories = $category->getTotalRows();?><?php if( $all_categories>0 ) : ?><ul><li>view by residence<ul><?php while ( $category->fetchRecord() ) : ?><?php// set our variables$category_name = $category->get_field('name');$category_photo = $category->get_field('photo'); /* a "cover slide" for the category */$category_slug = $category->get_field('slug');$category_room = $category->get_field('room');$category_residence = $category->get_field('residence');$category_portfoliopics = $category->get_field('portfoliopics');// data cleanup$category_photo = $category_photo[0]['guid'];$category_portfoliopics = $category_portfoliopics[0]['guid'];?><?php if(!empty($category_residence)) : ?><li><a href="<?php echo $category_slug; ?>"><?php echo $category_name; ?></a></li><?php endif ?><?php endwhile ?></ul></li></ul><?php endif ?>Part 2:
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051<?php global $pods;$podid = pods_url_variable(-1);$photorecord = new Pod('photo');$photorecord->findRecords('id ASC', 9, "category.slug = '$podid'");$allphotos = $photorecord->getTotalRows();$picturecategory = $photorecord->get_field('category');$picturecategory = $picturecategory[0]['name'];?><?php echo $photorecord->getPagination(' '); ?><h1 class="entry-title"><?php if($podid == "homes") {echo "Homes";}else if($podid == "high-rise-apartments") {echo "High-Rise Apartments";}/* etc. here - probably a better way to do this */?></h1><ul class="portfoliothumbs clearfix"><?php if($allphotos>0) : ?><?php while ($photorecord->fetchRecord() ) : ?><?php$picturename = $photorecord->get_field('name');$pictureslug = $photorecord->get_field('slug');$photo = $photorecord->get_field('photo');$photo = $photo[0]['guid'];?><?php$html = '<li>';$html .= '<a class="group" rel="portfoliogroup" title="' . $picturename . '" href="' . get_bloginfo('template_url') . '/timthumb.php?src=' . $photo;$html .= '&w=800&h=600&zc=3&q=100' . '">';$html .= '<img src="' . get_bloginfo('template_url') . '/timthumb.php?src=';$html .= $photo;$html .= '&h=146&w=146&zc=1" title="' . $picturename . '" alt="' . $picturename . '" /></a></li>';print($html);?><?php endwhile ?><?php endif ?>THANKS!
August 10, 2011 at 1:12 am #165591I have a similar problem with 2 pods on a page. Once you begin to paginate the other pod disappears.
May 13, 2013 at 2:16 pm #175214Hi all!
Anyone of you did manage to find the solution of this problem?
I’ve the same issue, one pods during the pagination reset the all the others
seems like that every pods is turning the pagethanks!!
Stefano
May 13, 2013 at 4:19 pm #175218Pass ‘search’ => false and ‘pagination’ => false to find() in order to turn off search and pagination for the find() loops you don’t want affected.
May 14, 2013 at 6:36 am #175222Yes! Thanks sc0ttkclark!
in my case, i’ve also i named each array of parameters in the same way ( $params ) and this was effecting the all the find() querygreat work with pods!
thanks againStefano
-
AuthorPosts
You must be logged in to reply to this topic.