Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2007-04-25 13:32:56

douglgm
Member
From: Bristol
Registered: 2006-08-23
Posts: 182
Website

Display a Sticky Article

I understand that marking an article as sticky removes it form the normal article flow.

However, is there any way to display it as an individual article without embedding it in another page?

For example:

I have a section called “Communications” which contains daily new articles.

I have an article called “About Comms” which isn’t a news article but an article about the comms team itself.

When looking at the article list, I don’t want to see About Comms, and I don’t want to bump into it when using previous/next or older/newer.

However, if I go to http://sitename/communications/about-comms I want to be able to see the “sticky” article?

Any suggestions?

Offline

#2 2007-04-25 18:32:35

wet
Developer Emeritus
From: Schoerfling, Austria
Registered: 2005-06-06
Posts: 3,330
Website Mastodon

Re: Display a Sticky Article

Add this snippet into your page template, somewhere around the place where <txp:article /> sits:

<txp:if_individual_article>
<txp:article status="sticky" />
</txp:if_individual_article>

This renders articles tagged as “sticky”, but only in single article mode, while hiding them in article lists.

Offline

#3 2007-04-25 20:00:36

douglgm
Member
From: Bristol
Registered: 2006-08-23
Posts: 182
Website

Re: Display a Sticky Article

Wow! Thanks for the quick reply! Just what I needed!

Offline

Board footer

Powered by FluxBB