Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2006-10-27 02:34:02

saturnflyer
Member
Registered: 2006-01-22
Posts: 40

sticky article on first page of list only

Does anyone know of a way to put a sticky article at the top of a page with an article list below. When you go to an older list of articles (such as pg=2), is there a way to hide the sticky article?

In other words, on page 1 you have a sticky article and an article list. On page 2 you have just the article list.

Offline

#2 2006-10-27 02:50:09

saturnflyer
Member
Registered: 2006-01-22
Posts: 40

Re: sticky article on first page of list only

I think this is basically what I want, but it doesn’t work for me.

<txp:php> if(ps('pg') != '') { </txp:php> <txp:article status="sticky" /> <txp:php> } </txp:php>

Offline

#3 2006-10-27 03:14:56

Mary
Sock Enthusiast
Registered: 2004-06-27
Posts: 6,236

Re: sticky article on first page of list only

Each instance of Textpattern’s php tag is run on it’s own and it’s straight PHP. What you’d do is this:

<txp:php>

if (ps('pg'))
{
	echo article(array(
		'status' => 'sticky'
	));
}

</txp:php>

But, I suspect you’d like the plugin much better. :)

Offline

#4 2006-10-27 18:06:15

saturnflyer
Member
Registered: 2006-01-22
Posts: 40

Re: sticky article on first page of list only

Thanks. The link to the actual plugin was down last night, but its up now.

Offline

Board footer

Powered by FluxBB