Textpattern CMS support forum

You are not logged in. Register | Login | Help

#11 2006-05-30 10:04:29

wet
Developer
From: Lenzing, Austria
Registered: 2005-06-06
Posts: 3,267
Website

Re: wet_if_page: Testing for listing page number

Oops. One fine day I’m going to learn how to handle this Textpattern thing ;-) Article’s up again. Sorry for the interruption, folks…

Last edited by wet (2006-05-30 10:04:43)

Offline

#12 2006-09-16 00:20:34

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

Re: wet_if_page: Testing for listing page number

hi robert,
the download/information link is broken again. could you fix it once more, please? thx.

edit: ah, after several hours the database is back. [btw: beautiful wordpress mockup layout at a.w.o.w. * big grin *]

Last edited by uli (2006-09-16 01:29:37)


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

Offline

#13 2007-11-29 22:55:07

Els
Admin
From: The Netherlands
Registered: 2004-06-06
Posts: 7,458

Re: wet_if_page: Testing for listing page number

I was looking for a way to show 5 articles on page 1, and 20 articles on all subsequent pages (in two columns of 10). After a lot of puzzling how to set the offset attribute, I finally found that this code works:

<txp:wet_if_page>
<txp:article form="list_frontgroot" limit="5" />
<txp:else />
<div class="frontcol1">
<txp:article form="list_col" limit="10" pageby="20" offset="-15" />
</div>
<div class="frontcol2 clearfix">
<txp:article form="list_col" limit="10" pageby="20" offset="-5" />
</div>
</txp:wet_if_page>
<span class="left"><txp:newer>nieuwer</txp:newer></span>
<span class="right"><txp:older>ouder</txp:older></span>

I am happy, because it does what I want. But I’ve never heard of the use of a negative value for offset…

Just posting this in case someone might want to do the same thing :)

Offline

#14 2008-01-08 22:27:19

guiguibonbon
Member
Registered: 2006-02-20
Posts: 296

Re: wet_if_page: Testing for listing page number

Wet, you might want to accept “last” and “first” in the page attribute. Here’s why

I didn’t know about this plugin back then.

Offline

#15 2008-05-16 02:55:13

maniqui
Moderator
From: Buenos Aires, Argentina
Registered: 2004-10-10
Posts: 3,070
Website

Re: wet_if_page: Testing for listing page number

Another possible way to have some content on first page and not on another numbered page:

<txp:chh_if_data>
<txp:page_url type="pg" />
<txp:else />
<!-- put here what belongs only to the first page ->
</txp:chh_if_data>

Of course, you can do more things with wet_if_page. And the above request by guiguibonbon would be a nice add too.


La música ideas portará y siempre continuará

TXP Builders – finely-crafted code, design and txp

Offline

Board footer

Powered by FluxBB