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
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
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.
Thanks, 12345j. I'd love to hear from some of them.
-Steve
-Steve
http://pastie.org/1336648
if you change BlockType to Package you can check for if a package is installed
if you change BlockType to Package you can check for if a package is installed
nice. ill keep that in my ever growing c5 toolbox.
Thanks, Mnkras. That just might be the ticket. Sometimes I overlook the obvious.
-Steve
-Steve