fetch entries with CustomField1 <>""

Skinning and designing Serendipity (CSS, HTML, Smarty)
Post Reply
reinhardl
Regular
Posts: 258
Joined: Wed Jun 20, 2007 8:54 am
Location: Germany

fetch entries with CustomField1 <>""

Post by reinhardl »

Hi,

normaly i fetch entries like this:

Code: Select all

{serendipity_fetchPrintEntries limit="0,3" category=$startpagerow.kategorie noCache=false fetchDrafts=false full=false use_footer=false template="entries_3gleich.tpl"} 
is it possible to fetch only these entries which have an CustomField1 !="" in serendipity_event_entryproperties plugin?

thanks
Timbalu
Regular
Posts: 4598
Joined: Sun May 02, 2004 3:04 pm

Re: fetch entries with CustomField1 <>""

Post by Timbalu »

Should be

Code: Select all

"ep_CustomField='customVal',ep_CustomField2='customVal2'"
shouldn't it?
See http://www.s9y.org/78.html
Regards,
Ian

Serendipity Styx Edition and additional_plugins @ https://ophian.github.io/ @ https://github.com/ophian
reinhardl
Regular
Posts: 258
Joined: Wed Jun 20, 2007 8:54 am
Location: Germany

Re: fetch entries with CustomField1 <>""

Post by reinhardl »

hmm..

Code: Select all

{serendipity_fetchPrintEntries limit="0,3" ep_CustomField1 !="" category=$startpagerow.kategorie noCache=false fetchDrafts=false full=false use_footer=false template="entries_3boxes.tpl"}  
do not work
Timbalu
Regular
Posts: 4598
Joined: Sun May 02, 2004 3:04 pm

Re: fetch entries with CustomField1 <>""

Post by Timbalu »

I am sorry, my fault. I should have been more precise.
It has to be entryprops="ep_something=true" - so in your case it should be

Code: Select all

{serendipity_fetchPrintEntries limit="0,3" entryprops="ep_CustomField1!=''" category=$startpagerow.kategorie noCache=false fetchDrafts=false full=false use_footer=false template="entries_3boxes.tpl"}
But I am not sure if the regex does notice a not equal (!=) notation. Just give it a try.

...and you should rename your customFields to something more meaningful.
Regards,
Ian

Serendipity Styx Edition and additional_plugins @ https://ophian.github.io/ @ https://github.com/ophian
reinhardl
Regular
Posts: 258
Joined: Wed Jun 20, 2007 8:54 am
Location: Germany

Re: fetch entries with CustomField1 <>""

Post by reinhardl »

it works
Thank you
Post Reply