Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#13 2018-04-13 15:27:10
- Summer
- Member
- Registered: 2018-01-29
- Posts: 60
Re: Sticky article does not show content
jakob wrote #311011:
<txp:article status=“sticky” />
<txp:article status=“live” />
This is a generated list?
The problem now is that the list is displayed and normal.
The content of the article is not displayed.
Offline
Re: Sticky article does not show content
Is there a way to get access to your install?
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: Sticky article does not show content
Summer wrote #311017:
<txp:article status="sticky" />
<txp:article status="live" />
This is a generated list?
The problem now is that the list is displayed and normal.
The content of the article is not displayed.
You need to use it in the else
bit of if_article_list
(i.e. it’s not a list) like I showed above.
Or you can use it inside an if_individual_article
container.
And if you are using a specific form to display your individual articles, you can also add form="my_individual_article_form"
as an attribute for txp:article.
TXP Builders – finely-crafted code, design and txp
Offline
Re: Sticky article does not show content
I understand that putting two <txp:article />
tags for individual articles can be counter intuitive. Should we patch it, or are there situations when you don’t want to show individual sticky articles content?
Offline
Re: Sticky article does not show content
etc wrote #311029:
I understand that putting two
<txp:article />
tags for individual articles can be counter intuitive. Should we patch it, or are there situations when you don’t want to show individual sticky articles content?
It has (almost) always been that way and we’ve grown used to it. It looks counterintuitive but does actually make sense.
At some point – many years ago – you used to be able to do status="live, sticky"
or status="4,5"
but it was taken out. I don’t think any other statuses/statii were allowed, so plugins emerged to list pending or draft articles. I forget why but there was a reason why the devs at the time were unwilling to reinstate it. I think it had to do with people like me not using sticky articles for what they meant to be used ;-) But there were times, like in search results, when it was useful to have the results from live and sticky articles all in one query together.
TXP Builders – finely-crafted code, design and txp
Offline
Re: Sticky article does not show content
jakob wrote #311031:
It has (almost) always been that way and we’ve grown used to it. It looks counterintuitive but does actually make sense.
I agree.
But there were times, like in search results, when it was useful to have the results from live and sticky articles all in one query together.
You still can if searchsticky
preference is true.
Offline
#19 2018-04-14 02:02:44
- Summer
- Member
- Registered: 2018-01-29
- Posts: 60
Re: Sticky article does not show content
jakob wrote #311031:
etc wrote #311032:
colak wrote #311019:
ummm… What I mean is how to display the entire content of the sticky article in the default article details page.
This default article details page:/forms/article/default.txp
<article class="article" itemprop="blogPost" itemscope itemtype="https://schema.org/BlogPosting">
<meta itemprop="mainEntityOfPage" content="<txp:permlink />">
<txp:if_individual_article>
<h1 itemprop="headline">
<txp:title />
</h1>
<txp:else />
...
...
</article>...
Edited: Textile — uli
Last edited by Summer (2018-04-14 02:31:25)
Offline
Re: Sticky article does not show content
Summer wrote #311033:
What I mean is how to display the entire content of the sticky article in the default article details page.
This default article details page:/forms/article/default.txp
In the “official” 4.7 theme you need to modify archive
page, appending
<txp:article status="sticky" />
just before <txp:article />
in the else
part of <txp:if_article_list />
tag. The theme itself does not use sticky articles, so the first question to ask is how you want to use them?
Offline
#21 2018-04-14 10:45:51
- Summer
- Member
- Registered: 2018-01-29
- Posts: 60
Offline
Re: Sticky article does not show content
jakob wrote #311031:
At some point – many years ago – you used to be able to do
status="live, sticky"
orstatus="4,5"
but it was taken out.
Some more background on that – github.com/textpattern/textpattern/issues/177#issuecomment-356296263
Offline
Re: Sticky article does not show content
gaekwad wrote #311047:
Some more background on that – github.com/textpattern/textpattern/issues/177#issuecomment-356296263
Thanks for the recall, will take a look.
Offline