By samwarren on
I created a block (call it image_views) using views to list images. I use it to navigate the image gallery. To handle many images, the views block has a pager.
The image_views block is located on a sidebar and the image is shown in center content area. (I am using Garland theme).
Now the questions: when I change to the 2nd page (or other pages) in image_views, and select an image to show, the image_views block automatically goes back to page 1. Can I make that views block to remember the page number?
This is probably not unique for image browser. I think any pager-enabled block will always set back to page 1 upon reloading the content. I enabled AJAX in views, it doesn't help.
Comments
If there is no direct
If there is no direct solution. A hack maybe done with pager.inc.
Can someone show me the way? I am just learning PHP.
I think this might be made default on pager functions. That is, remember the "$pager_current" when user leave the page and back to it again.
Can we use:
?
Any input from the Drupal/php gurus out there?
Thanks,
Any luck?
Hi samwarren,
I have the exact same problem and I'm looking for a solution. I was wondering if you had any luck since you posted.
Thanks!
subscribing
subscribing
No solutions yet?!?
No solutions yet?!?
Been working on get the
Been working on get the current pager number from a view displayed as a page and pass it to a block of the same view, so far I got to get the pager number from $_GET['page'].
Using it with the View PHP module I can get it with a php field in the block display.
Now only have to change the pager of the block to keep it synchronized with the page view, working on it ATM.
Im a simple guy in a complex world.
Ok, think i got it to
Ok, think i got it to work.
With Views PHP, set this code in the "Setup code" of a PHP field:
This works for pages with only one pager, if the block and the page view haev both pagers, $path will contain a string like 0,3,4 or so, so you may need to explode it and select the correct value.
Im a simple guy in a complex world.