Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2011-12-16 16:34:31

sacripant
Plugin Author
From: Rhône — France
Registered: 2008-06-01
Posts: 479
Website

<txp:article_custom MycustomField!="" /> CustomField not null

Hello,

article_custom used to return only articles that have precise value specified in a custom fields.
But how to return articles that have a value (not null) in the custom field?

Offline

#2 2011-12-16 17:01:52

Gocom
Developer Emeritus
From: Helsinki, Finland
Registered: 2006-07-14
Posts: 4,533
Website

Re: <txp:article_custom MycustomField!="" /> CustomField not null

The SQL statement uses LIKE operator, and doesn’t escape its wildcard pattern syntax, so you should be able to use its wildcards to specify fields with one or more characters. I.e.

<txp:article_custom my_custom_field="_%" />

Where _% would specify articles with one or more character in my_custom_field named custom field.

Offline

#3 2011-12-16 17:17:04

sacripant
Plugin Author
From: Rhône — France
Registered: 2008-06-01
Posts: 479
Website

Re: <txp:article_custom MycustomField!="" /> CustomField not null

Youhou,

Thanks Jukka

Offline

Board footer

Powered by FluxBB