I want to have access to the next element in the pager $nav_array['next'] from the node.tpl.php
I can't reach $nav_array from it. only from custom_pager.tpl.php
is it possible?
| Comment | File | Size | Author |
|---|---|---|---|
| #4 | cust-pager-navarray.diff | 2.24 KB | bleen |
I want to have access to the next element in the pager $nav_array['next'] from the node.tpl.php
I can't reach $nav_array from it. only from custom_pager.tpl.php
is it possible?
| Comment | File | Size | Author |
|---|---|---|---|
| #4 | cust-pager-navarray.diff | 2.24 KB | bleen |
Comments
Comment #1
botrissub
Comment #2
Toxid commentedI also want this.
Comment #3
halefxsubscribed
Comment #4
bleen commented... More generally, the entire nav_array should be available. Consider the following case:
I have a photo gallery using a custom pager or the next/prev buttons. Then my client come to me and says "hey, I want the gallery to move to the next photo when a user clicks on the actual photo."
The attached patch makes the entire nav array available in node.tpl at $custom_pagers[3]->nav_array where 3 == the custom_pager id...
Comment #5
Toxid commentedThanks, clicking on the photo to move to the next photo was what I had intended. I will try the patch now.
EDIT: I could not get access to $nav_array. It's still empty when I run it through print_r.
Comment #6
bleen commentedRe: Toxid ... because a node could be part of many many many pagers I could not include a simple $nav_array variable (because which nav array would be there?)
Try
print_r($custom_pagers[0]->nav_array)and see what you get. Using this method, each pager can have its unique nav_array available...Comment #7
Toxid commentedAh, I see now that you wrote it in the post with your patch, sorry I missed that. It works as you described :)
Comment #8
bleen commentedbump ... would *LOVE* to see this committed :)