Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2009-02-20 12:48:27

gomedia
Plugin Author
Registered: 2008-06-01
Posts: 1,373

Custom WHERE clause attribute for article tags

The ability to supply a custom WHERE clause in article tags would be nice.

For example, let’s say I wanted to display articles that were posted yesterday:

<txp:article where="WHEN datediff(now(), Posted) = 1" />

Offline

#2 2009-02-20 13:34:20

redbot
Plugin Author
Registered: 2006-02-14
Posts: 1,410

Re: Custom WHERE clause attribute for article tags

In this and other similar cases I reccommend the very useful smd_query plugin

Offline

#3 2009-02-21 21:11:07

gomedia
Plugin Author
Registered: 2008-06-01
Posts: 1,373

Re: Custom WHERE clause attribute for article tags

redbot wrote:

In this and other similar cases I reccommend the very useful smd_query plugin

Thanks, redbot. Yes, smd_query is fabulous but it’s a shame to have to build an <txp:article_custom/> by hand just to add one extra query criteria. Besides there are some article tags, such as <txp:posted /> that won’t work with it.

Posted, modified, and now expired dates/times are such a crucial part of the way we selected articles. Maybe it’s time to look at beefing up the standard article/article_custom tags with attributes such as posted="...", modified="..." & expires="...".

Sometimes time="any" & month="2009-02 are just a bit limiting.

Offline

Board footer

Powered by FluxBB