ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

entries - parameter for only returning entries that have field not null?

August 11, 2010 12:31pm

Subscribe [2]
  • #1 / Aug 11, 2010 12:31pm

    phoebe_reed

    82 posts

    I need to write a page that pulls from about 10 weblogs, but only pulls entries that have a field called “video” not null.  So only fields that have an entry in video.

    I don’t want to have it pull all entries and then just show videos, because that will be thousands of entries. 

    Is there a way with the entries tag to pull just things that have the field filled in, or do i write an SQL query?

    thanks,
    Phoebe

  • #2 / Aug 11, 2010 2:06pm

    Rob Allen

    3114 posts

    You could use the search: parameter here.

    In this example the weblog entries tag would only show entries where your_video_field is not empty (ege it has data in it).

    {exp:weblog:entries weblog="weblog1|weblog2|weblog3" limit="15" search:your_video_field="not IS_EMPTY"}
    Your stuff…
    {/exp:weblog:entries}
  • #3 / Aug 11, 2010 3:09pm

    Ingmar

    29245 posts

    Does that make sense, phoebe_reed? It’s what I’d suggested, too.

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases