Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2012-01-14 03:24:07

axelintu
New Member
Registered: 2012-01-14
Posts: 5

Is there any way to contro Second Page article listing?

Is there an if tag that can control when the user is on the second (third, fourth or any other than the first)?

I’m referring to when the url is http://mywebsite.com/?pg=2 or http://mywebsite.com/?pg=3

I want to be able to display/hide a banner so the results of the page ?pg=2 stay at the top of the page.

Any help regarding this would be appreciated. Thanks!

Offline

#2 2012-01-14 07:59:45

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

Re: Is there any way to contro Second Page article listing?

Hi

There are the soo if frontpage and the older but still working glx_if plugins which do not necessarily control the second page but you can make it control all pages but the first one


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 2012-01-14 09:24:38

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

Re: Is there any way to contro Second Page article listing?

And a non-plugin way using txp:page_url:

<!-- store pg url var in a variable -->
<txp:variable name="listing_page"><txp:page_url type="pg" /></txp:variable>

<!-- do different things depending on value of variable -->
<txp:if_variable name="listing_page" value="">
   <!-- banner on front page -->
<txp:else />
   <!-- no banner -->
</txp:if_variable>

TXP Builders – finely-crafted code, design and txp

Online

#4 2012-01-14 10:58:01

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

Re: Is there any way to contro Second Page article listing?

wow!! that’s a nifty one jakob.


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

Offline

#5 2012-01-15 03:10:54

axelintu
New Member
Registered: 2012-01-14
Posts: 5

Re: Is there any way to contro Second Page article listing?

Thank you, thank you, this is exactly what I needed.

Offline

Board footer

Powered by FluxBB