Jump to content

Pagination - remove content for page 2 onwards


Recommended Posts

Posted

I have a little blog page which has various functions on the top half of the page, then the actual list of blog posts on the lower half.

The blog posts are paginated.

However, I would like to lose the other rubbish from the top of the page when I go to page 2 and onwards, leaving only the list of blog posts.

Any bright ideas?

Joss

Posted

Hi Joss,

Could you wrap the content in a if statement checking if any page is greater then 1 do not display? Ryan does this in the pager module. Only shows the previous link if the page number is greater then 1.

Posted

Joss, you can get the page number with $input->pageNum, so:

if ($input->pageNum < 2) {
    // Show the thing
}
  • Like 5
Posted

What a lovely fellow!

Yep, that works. I was wondering how to get hold of the page number.

Thanks mate

Joss

Posted

I guess an example on my part would have been helpful. Sorry about that. Good thing there is always someone else in the forum that steps up to the plate.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...