Closed (won't fix)
Project:
Pagination (Node)
Version:
6.x-1.3
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
6 Feb 2009 at 01:47 UTC
Updated:
11 Feb 2009 at 03:11 UTC
It would be nice to have an option to choose to display the attached image (module attached_image, a image submodule), only on the first page.
It should be quite simple. I've added 1 line in pagination_nodeapi()
if (!$teaser and $paging) {
$body = $node->content['body']['#value'];
$pages = _get_pages($body, $paging);
if ($page !== 'show') {
// only adjust content if we're not showing the whole page
$node->content['body']['#value'] = $pages[$page];
if (module_exists('image_attach') and $page > 0) unset($node->content['image_attach']); // Added line
}
}
Comments
Comment #1
mundanity commentedHi there,
Thanks for the code, it'll be helpful to others who are in a similar situation. I don't want to add it at this time though, as I can easily see a lot of random modules doing similar. I'll try to think of a way to generically allow all module additions to a node to paginate with the content, but I'm not particularly sold on the idea of specific branches of coding logic for specific modules.