Link with node title
huayen - March 1, 2007 - 01:46
| Project: | Custom Pagers |
| Version: | 5.x-1.7 |
| Component: | User interface |
| Category: | feature request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | active |
Jump to:
Description
New release of 5.x-1.7 improves in theme, also great to be compatible with CCK contemplate.
Compared with previous versions, 'Next' and 'Previous' , instead of node titles, are used for navigation. So, is it possible to give an option to select node title or next/pre?
Thanks again for this great module.

#1
I'm taking a look at providing customizable output options for the module -- ie, a field into which you can paste your own HTML for output. The reason the 'default' pager style was simplified was speed: using this option, it's not necessary to do a full node load on both the previous and next nodes.
#2
Just wondering if anyone can quickly explain a temporary solution? I'd like the previous and next node titles to show up, rather than the default "previous" and "next" text.
I checked out the readme.txt file but I am completely lost. I created a function phptemplate_theme_custom_pager($nav_array, $node, $pager) and placed it within my template.php file, in order to customize. It mentions somewhere to use node_load(), but the only examples I could find were like this: $node = node_load($nid) -- however I can't see how that can be placed within this modified function anywhere.
Great module btw!!!
#3
Closed the duplicaate node linked below, which had some useful discussion.
http://drupal.org/node/185980
#4
Untested, but should work...
<?php$next_node = node_load($nav_array['next']);
$links['custom_pager_next'] = array(
'title' => $next_node->title,
'href' => !empty($nav_array['next']) ? 'node/'. $nav_array['next'] : NULL,
);
?>
Michelle
#5
Where do I place this code?