Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#166 2016-04-06 13:38:46
Re: etc_pagination: paginate everything
Can someone help me. I’m implementing ‘Foundation” to create a responsive website. Foundation has some handy ready to use css styles for pagination, however, there require additional codes to be added to the <a> links. I can’t figure out if, and if so, how this can be done with etc_pagination.
See http://foundation.zurb.com/sites/docs/pagination.html for examples
I would like to simply use the example tag provided in the help file: <txp:etc_pagination range=“2” prev=“Previous” next=“Next” wraptag=“ul” break=“li” />
Adding [ atts=’“pagination” role=“navigation” aria-label=“Pagination”’ ] takes care of the Foundation-required code in the UL but I can’t figure out how I can get the required additional code in the <a> links to make it work.
Anyone has any suggestions?
Alternatively, is it possible to add a class=“whatever” tag to the <a> links generated by etc_pagination. Currently I have know idea how to style them, as <span> doesn’t seem to work in combination with Foundation.
Last edited by Karsten (2016-04-06 13:40:32)
Offline
#167 2016-04-06 13:43:23
Offline
#168 2016-04-07 12:37:38
Re: etc_pagination: paginate everything
Karsten wrote #298526:
Anyone has any suggestions?
What is your suggestion? Things would be easier if etc_pagination were always supposed to generate <a> tags, but this would exclude, say, <select> link construction on the plugin’s page. Maybe, this is the way to go, though I’d rather prefer etc_pagination generate only page numbers/hrefs/rels and leave all wrapping to users. Currently, it is somewhere in between.
Alternatively, is it possible to add a class=“whatever” tag to the <a> links generated by etc_pagination.
Yes, etc_query can totally alter any markup, try
<txp:etc_query data='<txp:etc_pagination />' replace="//a@@class=whatever@aria-label=whatelse" />
Offline
#169 2016-04-07 13:15:58
Re: etc_pagination: paginate everything
Thanks, I used philwareham’s suggestion and this works!
I noticed however that this plugin only works after the txp:article tag, hence, pagination at the bottom of the list page is perfect, but what if you also want to have the same pagination links appear at the top of the list page? This does work with Soo_pagenumbers. Is there a way to put pagination links on the top of the screen with etc_pagination as well?
Offline
#170 2016-04-07 13:48:51
Re: etc_pagination: paginate everything
Karsten wrote #298542:
I noticed however that this plugin only works after the txp:article tag, hence, pagination at the bottom of the list page is perfect, but what if you also want to have the same pagination links appear at the top of the list page? This does work with Soo_pagenumbers. Is there a way to put pagination links on the top of the screen with etc_pagination as well?
soo_pagenumbers uses an interesting method, will think about it. Meanwhile, you can do the following:
<!-- store articles, setting pagination -->
<txp:variable name="articles" value='<txp:article />' />
<!-- pagination -->
<txp:etc_pagination />
<!-- articles -->
<txp:variable name="articles" />
Offline
#171 2016-04-07 13:51:36
Re: etc_pagination: paginate everything
etc wrote #298545:
soo_pagenumbersuses an interesting method, will think about it. Meanwhile, you can do the following…
Can you not use the article tag pgonly attribute to achieve this – would be cleaner code.
Offline
#172 2016-04-07 14:11:41
Re: etc_pagination: paginate everything
philwareham wrote #298546:
Can you not use the article tag
pgonlyattribute to achieve this – would be cleaner code.
You can, but it makes two attribute sets to modify if you need to change one. And I hope the new parser will make all these tricks unnecessary, in 4.7 maybe.
Offline
#173 2016-10-05 10:47:57
- msome
- Member
- Registered: 2015-09-16
- Posts: 40
Re: etc_pagination: paginate everything
<txp:etc_pagination prev="<" next=">" wraptag="ul" break="li" class="pagi" />
How do instead
< 1 2 3 4 5 6 7 8 9 10
Like this
10 9 8 7 6 5 >
Last edited by msome (2016-10-05 10:48:26)
Offline
#174 2016-10-05 10:55:33
Re: etc_pagination: paginate everything
This?
<txp:etc_pagination prev="<" next=">" wraptag="ul" break="li" class="pagi" gap="" first="" last="" range="2" pages="10" reversenumberorder="1" />
Edit: or this, if you want the page numbers be preserved:
<txp:etc_pagination prev="<" next=">" wraptag="ul" break="li" class="pagi" gap="" first="" last="" range="2" pages='<txp:etc_numpages />..1' />
Last edited by etc (2016-10-05 11:09:23)
Offline
#175 2016-10-05 11:36:55
- msome
- Member
- Registered: 2015-09-16
- Posts: 40
Re: etc_pagination: paginate everything
Thank you, Currently works, but to the full article somehow became displayed pagination..
Last edited by msome (2016-10-05 11:39:09)
Offline
#176 2016-10-05 12:02:17
Re: etc_pagination: paginate everything
msome wrote #301974:
Thank you, Currently works, but to the full article somehow became displayed pagination..
You probably just need to wrap it in <txp:if_article_list> … your pagination code … </txp:if_article_list> tags.
TXP Builders – finely-crafted code, design and txp
Offline
#177 2016-10-11 13:41:24
Re: etc_pagination: paginate everything
Offline
#178 2016-11-30 01:25:48
Re: etc_pagination: paginate everything
Hi Oleg, been trying to install the latest versions of etc_pagination – either 0.4.4 or 0.4.7b – over a 0.4.2 install and keep getting a 404 page after clicking upload…
I’ve modified the memory limit in php.ini and a couple of other settings, but still same result :(
Don’t have this problem updating other plugins on the site so I’m out of ideas now…
Offline
#179 2016-11-30 12:53:00
Re: etc_pagination: paginate everything
Hi Jonathan, no idea, sorry. I have tried, it (4.7b) installs and works well for me. I don’t even see how plugin upload can take you to a 404 page. Any clue in your network console?
Offline
#180 2016-11-30 13:28:25
Re: etc_pagination: paginate everything
Not so easy..the host has cPanel and can’t even find the error logs option nor any console access :(
Offline