SimplePager

Discuss PivotX 2.0.x extensions here, and view extensions that are available for download.

SimplePager

Postby Harm10 » Sun Feb 13, 2011 4:45 pm

Thread for the SimplePager extension: http://extensions.pivotx.net/entry/46/simplepager

Useful when you have lots of comments on 1 page or lots of list items in a (un)ordered list or lots of pages in a chapter or lots of other items that begin with the same html tag.
If the number of occurences is less than what you specify for pagination nothing is changed in your web page.

Version 0.2 released: contains a new option "pagenorepos" that makes it possible to turn off page repositioning after clicking the pager. Further some minor changes.

Version 0.3 released: added a new option "pageradjust" to adjust the pager to the left (or right) so you can get the pager in line with the paged elements. Css updated.

Version 0.4. released: some general enhancements and a new option to use the tag-ids of the child elements as values for the pager (thanks Marco!).
Quality is in the detail of things............

Want to change or update your PivotX site? Mail or PM me!
I can also convert your site to a Wordpress site!
Harm10
Developer
 
Posts: 2011
Joined: Wed Jun 17, 2009 9:37 am
Location: Somewhere in The Netherlands (aka Holland)

Re: SimplePager

Postby gwbonline » Mon Feb 14, 2011 9:26 am

Thanks for the extension. I converted my own implementation to the easy enabling of SimplePager. I have two issues though.

1) The li a active page number has more padding than the other numbers. See for an example the following page: http://www.cv-de-kleibakkers.nl/foto

I experimented a bit with the padding settings of "ul.simplePagerNav li" and "ul.simplePagerNav li a". Even added a padding to "ul.simplePagerNav li.currentPage a", but all won't result in exactly the same padding for active and inactive links (page numbers). The active page is bigger that the inactive numbers. The page number also aren't in line vertically with the images.

Css below.

2) The href parm still isn't fixed. Take a look at the same example page. When I click page 2 of the first image series, the page numbers are suddenly at the top an not the pictures. The same happens with the second images series. What I want is the what the third series does. Navigate to the bottom so you'll see all images. When I click a page number, these images change without jumping the page around.

ul.simplePagerNav {
margin-left:0;
padding-left:0;
}

ul.simplePagerNav li{
display: block;
float: left;
font-size: 14px;
font-family: georgia;
margin-left:5px;
padding:5px;
}

ul.simplePagerNav li a{
padding:5px;
border: 1px solid #D0312B;
}

ul.simplePagerNav li a:hover{
color:#fff;
background-color:#D0312B;
}

/* currentPage */
li.currentPage {
background: #D0312B;

}
ul.simplePagerNav li.currentPage a {
color: #ffffff;
}
gwbonline
 
Posts: 580
Joined: Tue Jan 01, 2008 5:17 pm

Re: SimplePager

Postby Harm10 » Mon Feb 14, 2011 11:45 am

I will have a look this evening (if I find the time). It could be useful if you generate a smaller page because this one is huge! Remember that the entire page content has to be loaded before pagination can have it's effect.
If you have such a page (maybe a temporary one) please post the link to it.
Quality is in the detail of things............

Want to change or update your PivotX site? Mail or PM me!
I can also convert your site to a Wordpress site!
Harm10
Developer
 
Posts: 2011
Joined: Wed Jun 17, 2009 9:37 am
Location: Somewhere in The Netherlands (aka Holland)

Re: SimplePager

Postby gwbonline » Mon Feb 14, 2011 11:56 am

I also use the SimplePager extension on my guestbook page: http://www.cv-de-kleibakkers.nl/2008-08-27/gastenboek

You´ll notice that the top, left, bottom and right padding is bigger when a page number is active. And when I click a page number, the navigation list jumps to the top. This is the same that happens on the image page. I would be solved when the list with page numbers stays where it is when you click on it.
gwbonline
 
Posts: 580
Joined: Tue Jan 01, 2008 5:17 pm

Re: SimplePager

Postby Harm10 » Mon Feb 14, 2011 2:46 pm

gwbonline wrote:And when I click a page number, the navigation list jumps to the top.
Your view jumps to where the page numbers are. This is intentional. If the page is below (or both) the pagination page the view also jumps to the top of the pagination page. This structure is designed like this especially to take care of "funny" jumping when the pager is below and the size of every pagination page is not known. Maybe it is possible to do this different according to the placing of the pager. I have to investigate.
Quality is in the detail of things............

Want to change or update your PivotX site? Mail or PM me!
I can also convert your site to a Wordpress site!
Harm10
Developer
 
Posts: 2011
Joined: Wed Jun 17, 2009 9:37 am
Location: Somewhere in The Netherlands (aka Holland)

Re: SimplePager

Postby gwbonline » Mon Feb 14, 2011 3:32 pm

All I want is a page with a pagination that doesn't jump to the top. Now it is, even when the previous (or next) page has exactly the same length. Especially for viewing images, it is annoying that the page numbers jump to the top so the viewer has to scroll down again to see the images every time they view an other page.
gwbonline
 
Posts: 580
Joined: Tue Jan 01, 2008 5:17 pm

Re: SimplePager

Postby Harm10 » Mon Feb 14, 2011 3:51 pm

I don't get your problem here. All what happens is that the page jumps to a view where the top of the pagination involved in the paging is at the top of your view.
The only part that has to be scrolled to is the part of the web page that is above the pagination part (so up scroll) or the pagination part that is currently shown (down scroll). So what you see after clicking a page number is the top of the content of the current pagination page.
So if your initial page looks like:
header
.... some info
pager for pagination
first pagination page
rest of page outside pagination

and you click on a page number the view starts with
pager for pagination
pagination page selected by the click
rest of page outside pagination
Quality is in the detail of things............

Want to change or update your PivotX site? Mail or PM me!
I can also convert your site to a Wordpress site!
Harm10
Developer
 
Posts: 2011
Joined: Wed Jun 17, 2009 9:37 am
Location: Somewhere in The Netherlands (aka Holland)

Re: SimplePager

Postby Schop » Mon Feb 14, 2011 3:57 pm

The SimplePager is probably the wron gtool for what you're doing.

In your case, I would go for something like the Anything Slider Plugin.

If you can create a number of divs that each have some thumbnails in it, you could slide those divs, done.
User avatar
Schop
Contributor
 
Posts: 485
Joined: Mon Apr 21, 2008 1:47 pm
Location: Hudson, Ohio

Re: SimplePager

Postby gwbonline » Mon Feb 14, 2011 4:02 pm

So instead of creating pages with SimplePager I can slide pages with thumbnails in with AnythingSlider (or some alternative)? This looks appealing and I will definitely try it. But I think this slider doesn't do what I want. I use SimplePager to make a long list of images shorter. SimplePager counts the amount of elements (automated by the gallery extension). For example: if an entry has more than 24 images (48) SimplePager creates two pages. I can't automate this with AnythingSlider (this works when I want to slide complete entries).
gwbonline
 
Posts: 580
Joined: Tue Jan 01, 2008 5:17 pm

Re: SimplePager

Postby Schop » Mon Feb 14, 2011 5:18 pm

gwbonline wrote:So instead of creating pages with SimplePager I can slide pages with thumbnails in with AnythingSlider (or some alternative)? This looks appealing and I will definitely try it. But I think this slider doesn't do what I want. I use SimplePager to make a long list of images shorter. SimplePager counts the amount of elements (automated by the gallery extension). For example: if an entry has more than 24 images (48) SimplePager creates two pages. I can't automate this with AnythingSlider (this works when I want to slide complete entries).


Well, of course it is not automatically going to divide your list of thumbnails up in bite sized pieces and spreading them over a bunch of divs. You'll have to do something yourself there. I'm just saying that that would probably be a nicer solution to what you are trying to do now.

You could use the %count% parameter to create several divs while looping through the images maybe?
User avatar
Schop
Contributor
 
Posts: 485
Joined: Mon Apr 21, 2008 1:47 pm
Location: Hudson, Ohio

Next

Return to 2.x Extensions

Who is online

Users browsing this forum: Google [Bot] and 1 guest

cron