Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2008-12-20 00:50:10

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

<txp:article /> on "sticky" individual article context...

…shouldn’t it return the sticky article?

Let me explain:
if there is a simple <txp:article /> on a page template and you visit an “sticky” article permanent link (/my-sticky-article-title/), shouldn’t the tag render the article?

It used to be that way, but I think Zem changed this long time ago, I can’t find the thread.

Currently, this is one way to display “live” articles in article-list context, and both “live” and “sticky” articles on their permlink:

      <txp:if_article_list>
      <txp:article />
      <txp:else />
      <txp:article status="sticky" />
      <txp:article status="live" />
      </txp:if_article_list>

Having two txp:article on your individual-article context (but finally just one of them is rendered) seems a little awkward.

Of course, if I think a little about it, txp:article, by default, displays just “live” articles, so it may seem consistent that when on permlink, it only displays the article if its status is set to “live”.

Zem may have had a valid reason to make this change. I’m just curious about it.
Does anyone know?

PS: there is a chance that I’ve opened a similar thread to this same some time ago, but my brain is burnt out and I can’t remember..

Last edited by maniqui (2008-12-20 00:52:50)


La música ideas portará y siempre continuará

TXP Builders – finely-crafted code, design and txp

Offline

#2 2009-09-02 22:43:47

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

Re: <txp:article /> on "sticky" individual article context...

A bump.
I still feel there is something wrong with the way this works.
When you are at an individual article URL, you are looking at an article, it doesn’t “care” if it’s sticky or if it’s live (imho).

As per this other thread, it seems that article tags (article_image, etc) on an individual article context aren’t being rendered if/when the article is sticky.

A word on this issue from TXP devs or any other TXP experienced user will be much appreciated.
Thanks.


La música ideas portará y siempre continuará

TXP Builders – finely-crafted code, design and txp

Offline

#3 2009-11-03 13:10:40

jens31
Plugin Author
From: munich / dtschermani
Registered: 2008-08-25
Posts: 183
Website

Re: <txp:article /> on "sticky" individual article context...

today i failed by the same reason, ended up using maniqui’s solution. why cant i choose multiple status for display like
<txp: article status=“live, sticky” />

and yes, why wont an article show up, if its an idividual one..
no big deal, but… why?

Offline

#4 2010-02-24 19:49:00

zeusdidit
Member
Registered: 2007-10-16
Posts: 111

Re: <txp:article /> on "sticky" individual article context...

maniqui, thanks for one solution to handle the sticky situation.

jens31, i agree with using no status brings back one, or use commas to limit what we want to show.

Offline

#5 2010-03-05 19:43:05

ploinkr
Member
From: Montreal
Registered: 2007-12-06
Posts: 83

Re: <txp:article /> on "sticky" individual article context...

Don’t understand either why we can’t use status="live,sticky" – seems logic that it would work. How do we request an enhancement on the google code Textpattern page?

Offline

#6 2010-04-08 03:32:58

hbchai
New Member
Registered: 2010-04-08
Posts: 1

Re: <txp:article /> on "sticky" individual article context...

I just encountered and was confounded by this problem as well. I filed an issue ticket: issue63

Haw-Bin

Last edited by hbchai (2010-04-08 03:33:28)

Offline

#7 2011-05-12 04:48:38

bici
Member
From: vancouver
Registered: 2004-02-24
Posts: 2,091
Website Mastodon

Re: <txp:article /> on "sticky" individual article context...

I too expect STICKY to act to keep an entry as the first article to appear in a section no matter when it was entered. At the moment if i want the Category “Introduction” to always be the first article to be shown when landing in the section Housing, i have to keep editing and making it the most current.
So that if a user enters text into a new category in Housing it then becomes the most current entry and gets displayed, instead of having “Introduction”. And the user won’t know to then go edit Introduction to bump it up to most current.

Please put the stickiness in Sticky


…. texted postive

Offline

#8 2011-06-06 15:58:25

marrael
New Member
From: Singapore
Registered: 2011-06-06
Posts: 2

Re: <txp:article /> on "sticky" individual article context...

I thought the Sticky status on articles was great until I ran into this problem too. Thank goodness I found this forum thread or else I would have been tearing out my hair. It makes no sense that that sticky articles won’t display on its own individual page, esp if you want comments on it, or if it’s especially long. (Both, in my case.)

@bici
Another fix (and the one I’ve settled on) is creating a custom field “feature” for my articles. Instead of looking for status=“5” for the sticky article in the <txp:article /> listing tag, feature=“yes” is substituted. What is annoying is I have to add feature=”“ to the next <txp:article /> listing tag where I don’t want the sticky to show up (again). Strikes me as inelegant, but it works for now.

Offline

Board footer

Powered by FluxBB