Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
[Solved] detect when article is sticky
Is there a way to detect sticky
articles in an article_custom
context?
ie
<txp:article_custom status section='<txp:section>' category='<txp:category />' listform="my_listform" />
Example output I am trying to get from the my_listform
:
<txp:posted />: <txp:permlink><txp:title /></txp:permlink>
<span class="sticky"><txp:posted />: <txp:permlink><txp:title /></txp:permlink></span>
<txp:posted />: <txp:permlink><txp:title /></txp:permlink>
<txp:posted />: <txp:permlink><txp:title /></txp:permlink>
Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.
Offline
Re: [Solved] detect when article is sticky
There’s wet_if_status but maybe this tip here works (Oleg’s tip borrowed from that thread):
<txp:if_custom_field name="status" value="5">
<!-- sticky article -->
</txp:if_custom_field>
TXP Builders – finely-crafted code, design and txp
Offline
Re: [Solved] detect when article is sticky
Here is the current list of article fields that can be extracted via <txp:custom_field />
(not formally supported):
annotate
article_image
authorid
body
category1
category2
comments_count
comments_invite
custom1
custom2
description
excerpt
expires
is_first
is_last
keywords
modified
override_form
posted
section
status
thisid
title
url_title
Offline
Re: [Solved] detect when article is sticky
jakob wrote #320955:
There’s wet_if_status but maybe this tip here works (Oleg’s tip borrowed from that thread):
<txp:if_custom_field name="status" value="5">...
Thanks so much. That did it!
Also, many thanks to Oleg for listing the extra fields. It’ll be handy.
Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.
Offline