Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#151 2015-10-18 12:26:44

etc
Developer
Registered: 2010-11-11
Posts: 5,677
Website GitHub

Re: etc_pagination: paginate everything

NicolasGraph wrote #295968:

5 for both if it’s what you’re asking.

Aha, then it’s not changed on plugins upgrade. Can you set it to, say, 3, and test again?

Offline

#152 2015-10-18 12:27:58

NicolasGraph
Plugin Author
From: France
Registered: 2008-07-24
Posts: 860
Website

Re: etc_pagination: paginate everything

I wrote to Jakob because he asked for stef to help him to get smd_tags and etc_pagination work together.
Maybe he found something simpler than what I’m using for now…

Edit: I sent him the new solution.

Last edited by NicolasGraph (2015-10-18 12:38:43)


Nicolas
Follow me on Twitter and GitHub!
Multiple edits are usually to correct my frenglish…

Offline

#153 2015-10-18 12:31:20

NicolasGraph
Plugin Author
From: France
Registered: 2008-07-24
Posts: 860
Website

Re: etc_pagination: paginate everything

etc wrote #295969:

Aha, then it’s not changed on plugins upgrade. Can you set it to, say, 3, and test again?

Let me call you Boss for today Oleg!


Nicolas
Follow me on Twitter and GitHub!
Multiple edits are usually to correct my frenglish…

Offline

#154 2015-10-18 13:15:42

etc
Developer
Registered: 2010-11-11
Posts: 5,677
Website GitHub

Re: etc_pagination: paginate everything

NicolasGraph wrote #295971:

Let me call you Boss for today Oleg!

And then claim some extras for Sunday work? :) Thanks for testing, helped me much. The story is that smd_tags rewrites $_SERVER['REQUEST_URI'], removing the /smd_tag part, so etc_pagination gets a shorten url. The new version loads before smd_tags and stores the true url before some other plugin modifies it.

Offline

#155 2015-10-18 13:42:19

NicolasGraph
Plugin Author
From: France
Registered: 2008-07-24
Posts: 860
Website

Re: etc_pagination: paginate everything

etc wrote #295974:

The story is that…

Thanks for the explanation, that’s what I understood when you asked me to change the load order.


Nicolas
Follow me on Twitter and GitHub!
Multiple edits are usually to correct my frenglish…

Offline

#156 2015-10-18 13:56:53

jakob
Admin
From: Germany
Registered: 2005-01-20
Posts: 5,202
Website GitHub

Re: etc_pagination: paginate everything

NicolasGraph wrote #295970:

I wrote to Jakob … Maybe he found something simpler than what I’m using for now … Edit: I sent him the new solution.

Thank you for alerting me. Looking back over my code, it seems I sidestepped the problem by a) calculating the total pages manually (i.e. outside of etc_pagination) from the total-number-of-matched-tagged-articles / number-per-page and plugging that into the pages attribute, and b) using pgcounter="page" instead of pg.
When I get some time, I’ll check out the new version of etc_pagination.


TXP Builders – finely-crafted code, design and txp

Offline

#157 2015-10-21 15:26:02

etc
Developer
Registered: 2010-11-11
Posts: 5,677
Website GitHub

Re: etc_pagination: paginate everything

Before releasing the next version, I want to put the “gaps” to contribution. Currently, they are just visual indicators, like this:

1 2 3 4 5 ... 100

The idea is to transform them into links to some intermediate value:

1 2 3 4 5 10 100

This value (10 above) can be chosen closer to the main range (1 2 3 4 5) or to the last link (100) following some numeric attribute. I need a clever name for this attribute: scale, drift, any ideas?

Offline

#158 2015-10-21 15:30:08

philwareham
Core designer
From: Haslemere, Surrey, UK
Registered: 2009-06-11
Posts: 3,565
Website GitHub Mastodon

Re: etc_pagination: paginate everything

scale sounds fine to me, in this sense.

Offline

#159 2015-10-21 15:38:48

etc
Developer
Registered: 2010-11-11
Posts: 5,677
Website GitHub

Re: etc_pagination: paginate everything

Thanks, Phil. Then which value of scale looks more natural for the linear scale (would give a link to page 53 = (5+100)/2 here): 0 or 1?

Offline

#160 2015-10-25 05:40:35

raminrahimi
Member
From: India
Registered: 2013-03-19
Posts: 278

Re: etc_pagination: paginate everything

could you please help me how to make etc_pagination to paginate through ajax ?
i mean all the pagination should work without reloading the page.
thanks

Offline

#161 2015-10-25 13:17:13

etc
Developer
Registered: 2010-11-11
Posts: 5,677
Website GitHub

Re: etc_pagination: paginate everything

raminrahimi wrote #296183:

could you please help me how to make etc_pagination to paginate through ajax ?
i mean all the pagination should work without reloading the page.

Sorry, I don’t understand, isn’t that what you have done here?

Offline

#162 2015-10-25 19:08:53

etc
Developer
Registered: 2010-11-11
Posts: 5,677
Website GitHub

Re: etc_pagination: paginate everything

The home site version is now enhanced with linked gaps and scale attribute.

Offline

#163 2015-10-27 08:05:52

raminrahimi
Member
From: India
Registered: 2013-03-19
Posts: 278

Re: etc_pagination: paginate everything

etc wrote #296188:

Sorry, I don’t understand, isn’t that what you have done here?

That was jscroll all the paginated pages was appending to one page that was solved :-) but now i want to just paginate the specific area using ajax.
following example paginating and reloading whole page, but need to paginate through ajax

<div id="recent" class="recent">
<txp:article_custom section="news" limit="3" offset='<txp:etc_offset pgcounter="page" pageby="3" />' pgonly="0">
	<txp:title />
</txp:article_custom>
</div>
<txp:etc_pagination pages='<txp:etc_numpages section="news" limit="3" />'
	mask="{prev}{next}" range="0" pgcounter="page"
	prev="<a href='{href}' class='jscroll'>Prev</a>"
	next="<a href='{href}' class='jscroll'>Next</a>"
/>

Offline

#164 2015-10-27 10:34:26

etc
Developer
Registered: 2010-11-11
Posts: 5,677
Website GitHub

Re: etc_pagination: paginate everything

So, you need to replace instead of append? If so, try this (include jQuery first):

<div id="wrapper">
<div id="recent" class="recent">
	<txp:article_custom section="news" limit="3" offset='<txp:etc_offset pgcounter="page" pageby="3" />' pgonly="0">
		<txp:title />
	</txp:article_custom>
</div>
<txp:etc_pagination pages='<txp:etc_numpages section="news" limit="3" />'
	mask="{prev}{next}" range="0" pgcounter="page"
	prev="<a href='{href}' class='jscroll'>Prev</a>"
	next="<a href='{href}' class='jscroll'>Next</a>"
/>
</div>

<script>
$(function () {
	$("#wrapper").on("click","a.jscroll",function(event) {
		event.preventDefault();
		$("#wrapper").load($(this).attr("href")+" #wrapper>*");
	});
});
</script>

Offline

#165 2015-10-28 16:48:19

raminrahimi
Member
From: India
Registered: 2013-03-19
Posts: 278

Re: etc_pagination: paginate everything

Aha thanks ETC ! that’s great, works fine for me :-)
if i want to have all the navigations as well like 1, 2, 3…. what to do ?

Last edited by raminrahimi (2015-10-28 17:00:45)

Offline

Board footer

Powered by FluxBB