I'm running pagination on a node type "article" and had quite a bit of customization.
After upgrading my page broke in a bad way, I was hoping someone might be able to help resolve the problem. I was able to fix some of the problems.

I had been loading my content with:

$node->content['body']['#value'];

And the pagination was loading with it, but after updates, the pager wasn't loading with this. I ended up adding:

<?php print $node->content['pagination_pager']['#value']; ?>

Right after that, and it now works.

My second issue, which I can't figure out is how to load my graphic from imagecache on only the 1st page.
I was running this code.

<?php $photo = $node->field_photo; ?>
<?php if ($photo): ?>
<?php
  $getpage = _get_page_var();
  if ($getpage === 0) {
    print $fieldPhoto;
  } else {
    print '';
  }
?>
<?php endif; ?>

It had been working, but all of a sudden it was causing major problems. It was saying that _get_page_var(); is not a defined function. Does this have something to do with me not getting the pagination from the body content anymore, but having to redeclare it?

Any help would be greatly appreciated.

Comments

mundanity’s picture

Hi there,

The internal structure of pagination has changed as of 1.4, if you want access to the old _get_page_var() function, change your code to:

<?php
    $pg =& Pagination::getInstance();
    if ($pg->getPageVar() == 0) {
    // etc...
    }
?>
jason ruyle’s picture

Thank you for the help. The code help me resolve the problem and the sites looking good.

mundanity’s picture

Status: Active » Closed (fixed)