Jump to content

Page count and position in list


a-ok
 Share

Recommended Posts

Hi folks,

I am trying to create a counter for items within a section... so say you have a Projects section, on each 'project detail', I'd have a counter and it would say this is page 1/25, for example.

I have the total count, but I'm not sure how to echo out which position/number the current page you are viewing is.

<?php echo $page->eq() ?> / <?php echo $page->parent->children()->count(); ?>

Any thoughts?

Thanks!

Link to comment
Share on other sites

Hi Wanze, thanks for your reply. Unfortunately sort doesn't work. Do you know how'd find the position of the current page inside the children() array? Is this in the documentation somewhere?

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