Jump to content

Change page output based on pagination


Liam88
 Share

Recommended Posts

Hi all,

Quick question as I haven't found anything from my Googling. 

I have a blog on the site which utilises pagination. On the standard blog page I have a custom header which has featured posts.

Below that I then have recent posts like mosts blogs.

Now if i click to page two or three I want the header to disappear and just show a continuation of the standard posts.

I'm not sure how to go about this so any direction would be helpful.

Thanks

Link to comment
Share on other sites

Hi there.

It's hard to provide specific instructions without knowing a bit more about your site – for an example whether you've installed a publicly available site profile or developed a custom one yourself – but you can check the page number in a template file and only show the header if the user is currently viewing page 1:

<?php if ($input->pageNum == 1): ?>

<!-- your header goes here -->

<?php endif; ?>

More details here.

  • Like 2
Link to comment
Share on other sites

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
 Share

×
×
  • Create New...