Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2007-09-28 14:38:13

andyflan
New Member
Registered: 2007-04-06
Posts: 6

article_custom and custom fields

Hi,

I want to use article_custom to return a list of articles where customFieldName contains any value/or is not empty. I cant seem to think my way through this.

<txp:article_custom mycustomfield=”%” />

Returns all records. I expected this to weed out the NULLs but on closer inspection there are no nulls, just empty strings. Has anyone got some wizzy mysql tricks I can employ here or maybe a plugin that will do what I want?

Thank you.

AndyFlan


AndyFlan

Offline

#2 2007-09-28 14:42:29

reid
Member
From: Atlanta, Ga.
Registered: 2004-04-04
Posts: 224
Website

Re: article_custom and custom fields

Try changing the article_custom tag attribute from mycustomfield to customfieldname.


TextPattern user since 04/04/04

Offline

#3 2007-09-28 14:47:18

andyflan
New Member
Registered: 2007-04-06
Posts: 6

Re: article_custom and custom fields

I just put mycustomfield in as a place holder. My tag actually looks more like this:

<txp:article_custom section=“clients” form=“clientitem” limit=“12” sort=”(custom_10+0), custom_4 desc, posted” video=”%”/>

Simplified for this example to:

<txp:article_custom video=”%”/>

The attribute in question is:

video=”%”

Last edited by andyflan (2007-09-28 14:49:15)


AndyFlan

Offline

#4 2007-09-28 15:34:43

andyflan
New Member
Registered: 2007-04-06
Posts: 6

Re: article_custom and custom fields

te he,

I sussed it:

<txp:article_custom video=”_%” />

This means it’s got to have at least one character but can have more.

Yay!!!!!

Thank you


AndyFlan

Offline

Board footer

Powered by FluxBB