Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2018-04-13 10:01:30

Summer
Member
Registered: 2018-01-29
Posts: 29

Sticky article does not show content

The sticky article list can be displayed, but click to enter the content page without displaying the content? What is the problem?

Offline

#2 2018-04-13 10:06:54

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 6,464
Website

Re: Sticky article does not show content

Hi could you please tell us what code you are using and in which context the sticky is not showing? (ie on the front page, on an individual article, category page etc)


Yiannis
——————————
neme.org | hblack.net | LABS | NeMe @ github

Offline

#3 2018-04-13 10:40:01

Summer
Member
Registered: 2018-01-29
Posts: 29

Re: Sticky article does not show content

colak wrote #310990:

Use

<txp:article_custom sort =“Posted desc”status =“sticky”limit =“3”> 
<a target="_blank" href="<txp:permlink />"><txp:title /></a>
</txp:article_custom>

on the home page。

EDIT: Textile — Uli

Last edited by uli (2018-04-13 10:55:46)

Offline

#4 2018-04-13 10:44:23

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 6,464
Website

Re: Sticky article does not show content

There seem to be spaces which shouldn’t be there. Try.

<txp:article_custom sort ="Posted desc" status="sticky" limit ="3"> 
<a target="_blank" href="<txp:permlink />"><txp:title /></a>
</txp:article_custom>

Yiannis
——————————
neme.org | hblack.net | LABS | NeMe @ github

Offline

#5 2018-04-13 11:04:23

uli
Moderator
From: Cologne
Registered: 2006-08-15
Posts: 4,080

Re: Sticky article does not show content

Summer, it seems like you copied code that was not displayed as code, i.e. not from inside pre or code tags. This forum (and most of the websites around Textpattern as a topic) converts straight quotes to curly ones by applying textile to “normal” text, like your own TXP website does.


In bad weather I never leave home without wet_plugout, smd_where_used and adi_form_links

Offline

#6 2018-04-13 11:25:14

Summer
Member
Registered: 2018-01-29
Posts: 29

Re: Sticky article does not show content

<txp:article_custom sort=“Posted desc” status=“sticky” limit=“3”>
I use this tag to output the sticky article list correctly.
But clicking on the title of the article to enter the page is an empty page.
My question is why the sticky article is an empty page. How to solve?

Offline

#7 2018-04-13 11:28:17

uli
Moderator
From: Cologne
Registered: 2006-08-15
Posts: 4,080

Re: Sticky article does not show content

There’s another potential problem with your code: <txp:title /> might lead to URLs that aren’t properly encoded. You’d better use <txp:article_url_title />. Strike that.


In bad weather I never leave home without wet_plugout, smd_where_used and adi_form_links

Offline

#8 2018-04-13 11:50:43

Summer
Member
Registered: 2018-01-29
Posts: 29

Re: Sticky article does not show content

uli wrote #311001:

There’s another potential problem with your code: <txp:title /> might lead to URLs that aren’t properly encoded. You’d better use <txp:article_url_title />.

http://text.local/articles/text1
This is the generated link. The live article status can display the article content, but the sticky article does not display the content.

Offline

#9 2018-04-13 12:21:16

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 6,464
Website

Re: Sticky article does not show content

Summer wrote #311003:

http://text.local/articles/text1
This is the generated link. The live article status can display the article content, but the sticky article does not display the content.

This could be because you are not using the sticky identifier in the article tag.

We have to know more about how you are using the tags but try.

<txp:article status="sticky" /> in the section where sticky articles are saved.


Yiannis
——————————
neme.org | hblack.net | LABS | NeMe @ github

Offline

#10 2018-04-13 13:21:19

Summer
Member
Registered: 2018-01-29
Posts: 29

Re: Sticky article does not show content

colak wrote #311004:

Copy and paste to the default article page, the front desk did not happen anything ~

Offline

Board footer

Powered by FluxBB