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.

no_results output showing when there are results

July 23, 2012 1:28pm

Subscribe [3]
  • #16 / Aug 15, 2012 12:09pm

    Dan Decker

    7338 posts

    Have I missed something on the relationship field type?

    Nope. That would be a hamstring, for sure.

    How is your PHP? This really could be nailed down with a plugin. The plugin would run your SQL, and return a piped list of entry IDs that could then be used as a fixed order parameter for channel entries.

  • #17 / Aug 15, 2012 12:31pm

    Andrew Armitage

    86 posts

    My php isn’t so bad, it’s just having the time to sit and work through it!

    What we’ve done as a temporary measure is add in some JavaScript to count the entries that are output - if there are none, then show a message. This seems to work well and we’ve added in a graceful fallback.

    We’d love to get into developing a few plugins - and perhaps this will give us the ideal opportunity - but for now time is against us so this will have to do for now.

    Really appreciate your help to get this far Dan.

    Thanks,
    Andrew

  • #18 / Aug 16, 2012 12:12pm

    Dan Decker

    7338 posts

    Hey Andrew,

    It’s been my pleasure!

    I totally get the “time is against us” angle. Here’s the source to a plugin I wrote a while back that does almost what I described to you.

    Look at the voted function. That outputs a pipe-delimited list of entry IDs by calling {exp:voter_ballot:voted}

    Anyway, hope that gives you a leg up! I like the solution you came to as well!

    Is there anything else I can assist you with?

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

ExpressionEngine News!

#eecms, #events, #releases