Textpattern CMS support forum

You are not logged in. Register | Login | Help

#221 2018-04-26 10:17:40

etc
Developer
Registered: 2010-11-11
Posts: 3,273
Website

Re: etc_pagination: paginate everything

You need to set the number of pages in etc_pagination in this case, <txp:article_custom /> does not set it. You can try

<txp:etc_pagination pages='<txp:etc_numpages pageby="5" section="blog" />' ... />

In 4.7 you can replace etc_numpages with

<txp:article_custom pgonly pageby="5" section="blog" />

But you’d better switch to <txp:article /> if you can.


etc_[ query | search | pagination | date | tree | cache ]

Offline

#222 2018-04-27 02:33:19

robhert
Member
From: Perú
Registered: 2007-04-27
Posts: 198
Website

Re: etc_pagination: paginate everything

Thanks etc. Currently using <txp:article />. :)

Offline

#223 2018-09-14 09:48:03

philwareham
Core designer
From: Farnham, Surrey, UK
Registered: 2009-06-11
Posts: 3,197
Website

Re: etc_pagination: paginate everything

Hi Oleg,

Just creating a Textpattern theme that uses etc_pagination if installed. Quick question, how can I allow localisation for the prev and next texts? i.e. to use the gTxt translations we have available in the core instead of hardcoded text?

Thanks!

Offline

#224 2018-09-14 10:03:27

etc
Developer
Registered: 2010-11-11
Posts: 3,273
Website

Re: etc_pagination: paginate everything

Hi Phil,

have you tried next='<txp:text item="next" />', it should work as usual..?


etc_[ query | search | pagination | date | tree | cache ]

Offline

#225 2018-09-14 10:09:52

philwareham
Core designer
From: Farnham, Surrey, UK
Registered: 2009-06-11
Posts: 3,197
Website

Re: etc_pagination: paginate everything

etc wrote #314014:

have you tried next='<txp:text item="next" />', it should work as usual..?

Great, I didn’t realise it would be that simple! Thanks Oleg.

Offline

#226 2018-09-14 10:15:38

etc
Developer
Registered: 2010-11-11
Posts: 3,273
Website

Re: etc_pagination: paginate everything

philwareham wrote #314016:

Great, I didn’t realise it would be that simple!

There is actually no way for a plugin to complicate it, since the attributes are parsed before the tag is called.


etc_[ query | search | pagination | date | tree | cache ]

Offline

#227 2019-08-15 09:04:37

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 7,318
Website

Re: etc_pagination: paginate everything

Hi Oleg,

I am making minor changes to my site, as sticky articles are not included in the feeds.

I am including a simplified code I am using in the blog section as I can not see what might be wrong.

<txp:evaluate query='<txp:page_url type="pg" /> = 1'>
<txp:article status="live" limit="9999" listform="sticky_form" />
</txp:evaluate>
<txp:article limit="10" listform="live_form" form="" />
<txp:etc_pagination range="5" prev="Previous" next="Next"  wraptag="ul" break="li" />

In the sticky_form I have

<txp:if_custom_field name="c10" value="x">
<article class="sticky"><h3>
<a href="<txp:permlink />" rel="bookmark"><txp:title /></a></h3>
<txp:excerpt />
</article>
<txp:else />
</txp:if_custom_field>

and In the live_form I have

<txp:if_custom_field name="c10" value="">
<article class="live">
<h3><a href="<txp:permlink />" rel="bookmark"><txp:title /></a></h3>
<txp:excerpt />
</article>
<txp:else />
</txp:if_custom_field>

Can anybody spot where I am messing up?


Yiannis
——————————
neme.org | hblack.net | LABS | State Machines | Respbublika! | NeMe @ github

Offline

#228 2019-08-15 09:11:30

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 7,318
Website

Re: etc_pagination: paginate everything

Got it! <txp:page_url type="pg" /> = 1'> should be <txp:page_url type="pg" /> = 2'>


Yiannis
——————————
neme.org | hblack.net | LABS | State Machines | Respbublika! | NeMe @ github

Offline

Board footer

Powered by FluxBB