Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#136 2015-10-17 17:38:58

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

Re: etc_pagination: paginate everything

NicolasGraph wrote #295935:

Sorry, it’s /oui_test/articles/smd_tags/periclitanti on each pages.

Ah, that’s strange. It means <txp:page_url /> looses ?pg=2 query part, which it normally shouldn’t. Could it be that some other plugin rewrites it?

Offline

#137 2015-10-17 17:42:22

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

Re: etc_pagination: paginate everything

etc wrote #295937:

Ah, that’s strange. It means <txp:page_url /> looses ?pg=2 query part, which it normally shouldn’t. Could it be that some other plugin rewrites it?

I disabled other plugins without success.


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

Offline

#138 2015-10-17 17:44:58

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

Re: etc_pagination: paginate everything

You can try to fix it by passing query='pg=<txp:etc_offset type="page" pageby="3" />' to your initial <txp:etc_pagination /> tag. And you actually don’t need adi_calc there, <txp:etc_numpages total='<txp:smd_tag_count wrapcount="" />' pageby="3" /> should do.

Offline

#139 2015-10-17 17:59:32

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

Re: etc_pagination: paginate everything

NicolasGraph wrote #295938:

I disabled other plugins without success.

Have you disabled smd_tags too? Looks like it does some request_uri rewriting.

Offline

#140 2015-10-17 17:59:45

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

Re: etc_pagination: paginate everything

etc wrote #295939:

You can try to fix it by passing query='pg=<txp:etc_offset type="page" pageby="3" />' to your initial <txp:etc_pagination /> tag. And you actually don’t need adi_calc there, <txp:etc_numpages total='<txp:smd_tag_count wrapcount="" />' pageby="3" /> should do.

I can’t get it work, it just adds another other url variable …?pg=1&pg=2 but the problems with or without root are the same. With root, links go to the right pages but pagination always think it is the first page. Without root, links are broken (http://localhost:8888/oui_test/articles?pg=2) but if I go manually the right pages, it detects the current page and current/prev/next links are ok.

Edit: but etc_numpages works fine, thanks.

Last edited by NicolasGraph (2015-10-17 18:00:58)


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

Offline

#141 2015-10-17 18:04:21

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

Re: etc_pagination: paginate everything

etc wrote #295941:

Have you disabled smd_tags too? Looks like it does some request_uri rewriting.

No, I didn’t. Your plugin works fine on section and category pages but what I would like is to get it work with smd_tags so I didn’t disabled it.


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

Offline

#142 2015-10-17 18:27:14

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

Re: etc_pagination: paginate everything

If etc_offset detects the right page, this should work:

<txp:etc_pagination pages='<txp:variable name="pages" />' pgcounter="pg" range="2" prev='<' next='>'
	root='<txp:page_url />/smd_tags/<txp:smd_tag_list wraptag="" break=""><txp:smd_tag_info /></txp:smd_tag_list>'
	query='pg=<txp:etc_offset type="page" />'
/>

I don’t see how it could add a second pg url parameter, sorry.

Offline

#143 2015-10-17 18:35:25

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

Re: etc_pagination: paginate everything

etc wrote #295945:

If etc_offset detects the right page, this should work:

<txp:etc_pagination pages='<txp:variable name="pages" />' pgcounter="pg" range="2" prev='<' next='>'...

I don’t see how it could add a second pg url parameter, sorry.

THANK YOU!
I’ll maybe post on textpattern tips; it could be usefull for anyone else; what do you think?


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

Offline

#144 2015-10-17 18:39:24

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

Re: etc_pagination: paginate everything

You are welcome! And I will think of a more automatic solution for the next version.

Offline

#145 2015-10-18 11:31:31

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

Re: etc_pagination: paginate everything

Nicolas, can you test the new version for me? This should work now:

<txp:etc_pagination pages='<txp:variable name="pages" />' pgcounter="pg" range="2" prev='<' next='>' />

Thanks.

Edit: it’s on my site, not yet on .org neither Github.

Last edited by etc (2015-10-18 11:40:41)

Offline

#146 2015-10-18 11:54:02

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

Re: etc_pagination: paginate everything

etc wrote #295962:

Nicolas, can you test the new version for me?

Sorry it doesn’t change anything.


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

Offline

#147 2015-10-18 12:00:10

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

Re: etc_pagination: paginate everything

Have you flushed the cache? and what is smd_tags loading order?

Edit: please check “Order” on plugins tab, etc_pagination must load before smd_tags.

Last edited by etc (2015-10-18 12:01:58)

Offline

#148 2015-10-18 12:04:24

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

Re: etc_pagination: paginate everything

etc wrote #295964:

Have you flushed the cache? and what is smd_tags loading order?

Yes.
It’s 5.

Edit: It seems that etc_pagination can’t get the right smd_tag_list url…

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


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

Offline

#149 2015-10-18 12:07:48

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

Re: etc_pagination: paginate everything

NicolasGraph wrote #295965:

Yes.
It’s 5.

And this of etc_pagination?

Offline

#150 2015-10-18 12:15:08

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

Re: etc_pagination: paginate everything

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


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

Offline

Board footer

Powered by FluxBB