Fallback Block - if no others are visible, show this one?



Hi,

Can anyone point me to a PHP snippet that will show one of my blocks in the sidebar on the condition that no others are currently shown in that position on the page?

Most of my pages use blocks on the sidebar generated by views - but if those blocks are not filled in, I want to make sure I have "something" in that sidebar. - I have a 'generic' type block that will work in that position, but at the moment it is there ALL the time, I want to hide it when other blocks are in place or the sidebar goes down the page too long - there are too many different types of page to do it by specifying paths or templates and as the views blocks are generated from content my users may/may not have uploaded, there is no guarantee that there will be anything in that sidebar...

I would guess that I need an argument to check whether any blocks are present in "right sidebar" on this page & if not load this block instead - I'm figuring this snippet must already be out there somewhere, i just can't get the keywords right to find it!

Any hints or tips welcome. Thanks