Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2011-04-18 12:22:49

tye
Member
From: Pottsville, NSW
Registered: 2005-07-06
Posts: 859
Website

Pagination if page 2 :)

Just had an interested conversation with a client who said that her clients didn’t know she had lots of articles because when they clicked onto page number 2,3,4 or 5 etc (I’m using ob1_pagination – but the same would apply to all the pagination options in txp core – to my knowledge) – it still showed the sticky article at the top of the article list on all pages of the pagination.

Is there a way to only show the sticky on the first page of pagination, then just show the article list?

Offline

#2 2011-04-18 14:04:12

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 9,257
Website GitHub Mastodon Twitter

Re: Pagination if page 2 :)

Hi Tye

glx_if offers “glx_if_section_frontpage” amongst other conditionals.


Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.

Offline

#3 2011-04-18 20:07:27

els
Moderator
From: The Netherlands
Registered: 2004-06-06
Posts: 7,458

Re: Pagination if page 2 :)

Offline

#4 2011-04-18 20:10:52

uli
Moderator
From: Cologne
Registered: 2006-08-15
Posts: 4,315

Re: Pagination if page 2 :)

Umm …

<txp:variable name="page-one"><txp:page_url type="pg" /></txp:variable>

<txp:if_variable name="page-one" value="">
You're on page 1
<txp:else />
You're on any of the following pages
</txp:if_variable>

In bad weather I never leave home without wet_plugout, smd_where_used and adi_form_links

Offline

#5 2011-04-18 20:19:07

els
Moderator
From: The Netherlands
Registered: 2004-06-06
Posts: 7,458

Re: Pagination if page 2 :)

Hey, I am the one supposed to come up with the variable/if_variable solution ;)

The reason I didn’t, is because I seem to remember that ob1_pagination adds &pg=1 to the URL if you click the 1 in the page numbers list. I may be wrong though. And it would still be doable without plugin, just needs another <txp:else /> in there ;)

Last edited by els (2011-04-18 20:20:40)

Offline

#6 2011-04-18 20:29:04

uli
Moderator
From: Cologne
Registered: 2006-08-15
Posts: 4,315

Re: Pagination if page 2 :)

Els wrote:

Hey, I am the one supposed to come up with the variable/if_variable solution ;) […] The reason I didn’t, is because I seem to remember that ob1_pagination adds &pg=1 to the URL if you click the 1 in the page numbers list.

Ooo damn, I couldn’t even feel Els-ish for nine minutes ;))


In bad weather I never leave home without wet_plugout, smd_where_used and adi_form_links

Offline

#7 2011-04-19 06:11:09

tye
Member
From: Pottsville, NSW
Registered: 2005-07-06
Posts: 859
Website

Re: Pagination if page 2 :)

Thanks Guys – i really need to brush up on my txp:variables… very powerful and would probably make my life easier.

<txp:page_url type="pg" /> is a tag I have never used or come across before :)

Offline

Board footer

Powered by FluxBB