Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#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

#2 2018-10-04 10:20:57

etc
Developer
Registered: 2010-11-11
Posts: 5,053
Website GitHub

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

#4 2018-10-04 12:22:31

etc
Developer
Registered: 2010-11-11
Posts: 5,053
Website GitHub

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

#6 2018-10-04 12:51:57

etc
Developer
Registered: 2010-11-11
Posts: 5,053
Website GitHub

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

Board footer

Powered by FluxBB