Personally, if there are no upcoming events I'd rather that the block not appear. At the very least it would be helpful to have a bit of text explaining that no events were found.
The attached patch hides the upcoming event block if no events are found.
| Comment | File | Size | Author |
|---|---|---|---|
| #9 | event.module_no_events_found_4-6.patch | 575 bytes | drewish |
| #6 | event.module_hide_empty_setting.patch | 2.28 KB | drewish |
| event.module_16.patch | 1.04 KB | drewish |
Comments
Comment #1
killes@www.drop.org commentedWhile the feature makes sense to me, I'd like to hear the opinion of some usability experts. Should we simply hide the block or should we display a "not found" message?
Comment #2
drummI think having a message is a good idea.
Comment #3
joel_guesclin commentedI think it should be made a configurable option, so you can choose whichever you want
Comment #4
igrcic commented'There are no new events soon' or similar message would do just fine i think :)
Comment #5
crunchywelch commentedadded message 'no upcoming events available' in cvs
Comment #6
drewish commentedI've got a patch to make it a setting for the block.
Comment #7
killes@www.drop.org commentedPlease, not yet another setting. The output of that node is themable, so you can change it to mysteriously disappear in your theme.
In fact, this block has a problem: On a cached page it will not change. If your site is only used for posting events once every quarter your page will be cached and the block will display wrong dates. We could add a cron hook that clears all of the cache once in a while...
Comment #8
drewish commentedThe real problem is with caching in general. Caching the same page for longer than an hour isn't a good idea. I've got a block I developed for the radio station I work at that displays the current program. I had to disable caching or it would never update. I'll see if there's an open issue related to this.
Comment #9
drewish commentedhere's a backport of crunchywelch's change for 4.6. not sure if you want to apply it.
Comment #10
killes@www.drop.org commentedwe display a "not found" message
Comment #11
joel_guesclin commentedActually, I sorted the whole problem by using Views instead of the standard Events block.
Comment #12
(not verified) commented