Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2013-04-03 16:28:11

springworks
Member
Registered: 2005-01-06
Posts: 172
Website

Extend status attributes of article and article_custom tags

I’ve just bumped up against a need to retrieve a single list of articles that includes sticky and live articles.

From a search of the forums, it seems that this has been a recurring topic. Whilst I am aware that there are several plug-ins that offer this functionality, it seems to me to be a useful extension of core to include the ability to retrieve articles of more than one status in a single list.

So I am proposing that the status attribute of both article and article_custom are extended to allow articles with a mix of chosen statuses to be included in the results of the tags. So, for example:

<txp:article status="live,sticky" limit="3" sort="posted, desc" />

returns the 3 most recent articles in the current section with either a “live” or “sticky” status.

Similarly:

<txp:article_custom category="animals" status="live,sticky" limit="7" sorted="rand()" />

would return 7 random articles in the “animals” category with a status of either “live” or “sticky”.

It just seems an unnecessary restriction to only allow “live” or “sticky” articles to be returned, rather than also allow a combination of both.

I think the default for both should still be to just return “live” articles unless otherwise stated.

Thoughts?

Offline

#2 2013-04-06 21:18:15

springworks
Member
Registered: 2005-01-06
Posts: 172
Website

Re: Extend status attributes of article and article_custom tags

No one else interested in this?

Offline

#3 2013-04-07 06:49:05

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 9,012
Website GitHub Mastodon Twitter

Re: Extend status attributes of article and article_custom tags

Hi Steve the issue came up a number of times. You may be able to achieve what you want with a plugin developing this example. In txp, stickies are normally used for static content as such they are treated differently. Use the google search on the top of the page for "live,sticky" for further examples and requests


Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.

Offline

#4 2013-04-07 20:53:00

springworks
Member
Registered: 2005-01-06
Posts: 172
Website

Re: Extend status attributes of article and article_custom tags

colak wrote:

Hi Steve the issue came up a number of times. You may be able to achieve what you want with a plugin developing this example. In txp, stickies are normally used for static content as such they are treated differently. Use the google search on the top of the page for "live,sticky" for further examples and requests

Hi Yiannis

Thanks, yes I did search the forum and came up with a solution (using aks_article) to do what I wanted.

I just thought that it would be a good idea to include a more flexible selection criteria for the the standard article and article_custom tags so a plugin wasn’t needed if you wanted to choose to show live and sticky articles in the same list.

From the lack of replies it seems like I’m in the minority so I’ll stick to using a plugin to achieve what I need for this site!

Offline

#5 2013-04-17 14:49:18

makss
Plugin Author
From: Ukraine
Registered: 2008-10-21
Posts: 355
Website

Re: Extend status attributes of article and article_custom tags

This feature is planned, but when it is done – is unknown.


aks_cron : Cron inside Textpattern | aks_article : extended article_custom tag
aks_cache : cache for TxP | aks_dragdrop : Drag&Drop categories (article, link, image, file)

Offline

#6 2013-04-17 18:59:46

springworks
Member
Registered: 2005-01-06
Posts: 172
Website

Re: Extend status attributes of article and article_custom tags

makss wrote:

This feature is planned, but when it is done – is unknown.

Aaah, thanks for that, I didn’t realise that is had already been flagged.

Offline

Board footer

Powered by FluxBB