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 » Tue Jul 07, 2015 9:17 pm

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

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

Re: fetch entries with CustomField1 <>""

Post by Timbalu » Wed Jul 08, 2015 10:33 am

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 » Wed Jul 08, 2015 10:10 pm

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

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

Re: fetch entries with CustomField1 <>""

Post by Timbalu » Thu Jul 09, 2015 10:05 am

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 » Fri Jul 10, 2015 8:05 am

it works
Thank you

Post Reply