Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2018-08-13 13:40:38

Bongo-man
Member
Registered: 2009-03-18
Posts: 243

Sticky articles (only) in txp feed_link - HowTo?

Is there any way to get an Atom-feed providing only ‘sticky’ articles (or all the articles published in a certain month)?

I’ve also tried to set a ‘sticky’ category for them, without result.

Last edited by Bongo-man (2018-08-13 14:28:48)

Offline

#2 2018-09-14 14:24:54

Bongo-man
Member
Registered: 2009-03-18
Posts: 243

Re: Sticky articles (only) in txp feed_link - HowTo?

I was trying to get a feed containing the latest articles, monthly published.
So I thought the easiest was to stick them; but I can’t find a way to get them in an rss feed.

Offline

#3 2018-09-14 14:37:56

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

Re: Sticky articles (only) in txp feed_link - HowTo?

There is no pre-4.7.2 way, I’m afraid, unless you construct the feed manually and output it via rah_external_output (examples should be somewhere on the forum). In 4.7.2 it will be possible, but we are not sure yet in what form.

But the default RSS feed outputs already the latest articles, what’s wrong with it?

Offline

#4 2018-09-14 14:45:54

Bongo-man
Member
Registered: 2009-03-18
Posts: 243

Re: Sticky articles (only) in txp feed_link - HowTo?

The issue comes from those website parsing my RSS feed.
I do use the default RSS, but they need to parse a same link.
But if I publish 4 articles at August and 5 at September, the default feed should change from https://www.mywebsite.xxx/atom/?limit=4 to https://www.mywebsite.xxx/atom/?limit=5).

So no external sites can’t parse my entire RSS-feed, with the latest-articles, because the feed they downloaded contains only 4 links.

Last edited by Bongo-man (2018-09-14 14:58:43)

Offline

#5 2018-09-14 14:58:25

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

Re: Sticky articles (only) in txp feed_link - HowTo?

You can try this as feeds URL (4.7+):

https://www.mywebsite.xxx/atom/?limit=<txp:article_custom time="first day of this month" pgonly pageby="1" />

This should count the articles published between first day of this month and now.

Edit: or rather

<txp:feed_link limit='<txp:article_custom time="first day of this month" pgonly pageby="1" />' />

Last edited by etc (2018-09-14 15:04:26)

Offline

#6 2018-09-14 15:17:47

Bongo-man
Member
Registered: 2009-03-18
Posts: 243

Re: Sticky articles (only) in txp feed_link - HowTo?

I’ve tried the second expression, as follow:

<txp:feed_link limit='<txp:article_custom time="2018-08-01" pgonly pageby="1" />' ><img src="/rss.gif" height="14" /></txp:feed_link>

but it doesn’t work: it displays this URL: www.mywebsite.xxx/rss/?limit=0 and it shows articles published since May 2017.

Last edited by Bongo-man (2018-09-14 15:18:15)

Offline

#7 2018-09-14 15:50:18

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

Re: Sticky articles (only) in txp feed_link - HowTo?

It works for me. Make sure that you have

  • txp 4.7
  • some live articles in a syndicated section published since 2018-08-01.

Offline

#8 2018-09-14 18:24:56

Bongo-man
Member
Registered: 2009-03-18
Posts: 243

Re: Sticky articles (only) in txp feed_link - HowTo?

Thanks for your answer.
If ‘ve found a different solution profiting, only for this feed, of a different kind expression I previously used; anyway I will try again to profit of your solution.

Offline

Board footer

Powered by FluxBB