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

mundanity’s picture

Status: Active » Closed (won't fix)

Hi 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.