Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#1 2018-10-04 08:33:23
- Bongo-man
- Member
- Registered: 2009-03-18
- Posts: 243
[SOLVED] Sticked articles don't display the author, below the text
I’m using the option sticked to highlight the most recent articles in the home page, but I’ve noticed that they don’t display the author & date and the source, that I add by means of a customized field.
Why?
Last edited by Bongo-man (2018-10-04 13:32:50)
Offline
Re: [SOLVED] Sticked articles don't display the author, below the text
That probably means that the article form used to output sticky
articles does not contain these fields. What is the complete <txp:article status="sticky" />
tag code?
Offline
#3 2018-10-04 12:00:14
- Bongo-man
- Member
- Registered: 2009-03-18
- Posts: 243
Re: [SOLVED] Sticked articles don't display the author, below the text
<div>
<txp:body />
<txp:article form=“author” />
</div>
-> form:
<txp:if_article_author name=“admin”>
<p><span>Source:</span> <txp:custom_field name=“Source” /></p>
<p><txp:linklist category=“author”>
<span>Author:</span>
<txp:link rel=“author” /></txp:linklist>, <txp:posted /></p>
</txp:if_article_author>
<txp:if_article_author name=“translator”>
<p><span>Source:</span>
<a rel=“external” href=”<txp:custom_field name=“Source of translated article” default=“error.html” />” ><txp:custom_field name=“Source of translated article” /></a>
</p>
<p><span class=“autoresub”>Pubblished on</span> <txp:posted />; <b>translation by</b> <txp:linklist category=“author”><txp:link />.</txp:linklist></p> (in this case in the linklist there is only one translator, so the link is always the same)
</txp:if_article_author>
Last edited by Bongo-man (2018-10-04 12:10:30)
Offline
Re: [SOLVED] Sticked articles don't display the author, below the text
I think it’s because <txp:article />
only outputs live articles by default. Try appending <txp:article status="sticky" form="author" />
after <txp:body />
.
Offline
#5 2018-10-04 12:32:29
- Bongo-man
- Member
- Registered: 2009-03-18
- Posts: 243
Re: [SOLVED] Sticked articles don't display the author, below the text
It works fine, but now it doesn’t work in the articles that are not sticked.
Last edited by Bongo-man (2018-10-04 12:34:41)
Offline
Re: [SOLVED] Sticked articles don't display the author, below the text
Try to replace <txp:article form="author" />
(sticky or not) with <txp:output_form form="author" />
. I presume you have this code in individual article part of your page.
Offline
#7 2018-10-04 12:57:39
- Bongo-man
- Member
- Registered: 2009-03-18
- Posts: 243
Re: [SOLVED] Sticked articles don't display the author, below the text
Thank you; now it works fine, all!
In such case I’ve removed <txp:article /> and changed it to:
<txp:body />
<txp:output_form form=“author” />
Last edited by Bongo-man (2018-10-04 12:58:00)
Offline