Closed (duplicate)
Project:
Custom Pagers
Version:
5.x-1.7
Component:
Miscellaneous
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
23 Oct 2007 at 20:36 UTC
Updated:
18 Mar 2008 at 11:25 UTC
How can you have custom pagers display the titles of the previous and next page instead of just saying "previous" and "next," i.e. as with the Forum built in function?
Comments
Comment #1
florianr commentedI am also looking for a solution. I found the documentation talking about that, but I have no idea how to reallize that.
Perhaps someone has a usefull snipet?
Thanks
Comment #2
liamgh commentedI found the answer to this in the file "theme_sample.php" which is part of the download. This provides a useful theming function that displays the titles of the nodes rather than page numbers. There is a slight overhead though that it has to look up the names of the titles. Hope this helps.
Comment #3
xentek commentedThe easiest way to work this is to copy the function from the theme_sample.php into the main module file, overwriting the one contained therein OR add it as an override functions in your theme files (may need to rename - drop the "my_" from the beginning of the function name).
Comment #4
BradM commentedI couldn't get this to work in drupal 5.6.
I first copied the code in the example file into my template.php, renaming/replacing the function
phptemplate_theme_custom_pager. There was no change at all.So I then copied it into the template.php file as a new function,
bluemarine_custom_pager. I then got a php error, the good old 'cannot use stdclass as an array'. The line in question was$prevttl = $prev_details['title'];Can any of you guys who got it to work explain exactly what you did?
Thanks.
Comment #5
wayland76 commentedThis is a duplicate of http://drupal.org/node/123690 -- please continue discussion there.