Check If Block Type Installed - Best Practice?

Permalink
I'm wondering what the best practice is for checking if a particular block (block type, actually) is installed.

Let's say I have developed a block of type Widget. My Widget block is self-contained and fully functional, not requiring anything else to be installed by the user in order to work as advertised.

However, let's say that Widget CAN take advantage of functionality in the Gizmo block IF the user has that particular block type installed. Widget does not rely in any way on Gizmo, but certain functionality in Widget can be enabled if Gizmo is available.

My question is, what's the best (most robust, best practice) way to check for the presence of the Gizmo block on the user's system?

Has anyone done this type of thing before? Any insight would be greatly appreciated.

Thanks much,

-Steve

Shotster
 
12345j replied on at Permalink Reply
12345j
well id assume some ecommerce extra developers would have something like that to make sure ecommerce was installed. might be a good place to start.
Shotster replied on at Permalink Reply
Shotster
Thanks, 12345j. I'd love to hear from some of them.

-Steve
Mnkras replied on at Permalink Best Answer Reply
Mnkras
http://pastie.org/1336648

if you change BlockType to Package you can check for if a package is installed
12345j replied on at Permalink Reply
12345j
nice. ill keep that in my ever growing c5 toolbox.
Shotster replied on at Permalink Reply
Shotster
Thanks, Mnkras. That just might be the ticket. Sometimes I overlook the obvious.

-Steve