
Originally Posted by
lat9
You could have an auto-loaded observer as part of the encapsulated plugin's file-set and code that observer such that it sets a 'global' variable that indicates its presence.
The code that's deciding whether/not to include that centerbox could then simply check for !empty($plugin_presence_indicator) to do its thing.
Damn it, Cindy, that was a brilliant idea - I would never have thought of that! Many thanks! 
For anyone who would like to do the same, here's the solution:
Add a new file in your zc_plugins/your_plugin/version/catalog/includes/classes/observers/ named auto.yourplugin_plugin_presence_indicator.php (in my case auto.testimonials_plugin_presence_indicator) with the following content:
Code:
<?php
/**
* Observer class used to indicate the plugin is active
*/
class zcObserverTestimonialsPluginPresenceIndicator extends base
{
public function __construct()
{
// Declare the global variable and set it to true
global $testimonials_plugin_presence_indicator;
$testimonials_plugin_presence_indicator = true;
}
}
Don't forget to change the class name based on file name.
That's it - now you have a global variable you can use anywhere in the system. In my case, I'm using it like this:
Code:
<?php
if (!empty($testimonials_plugin_presence_indicator)) {
require($template->get_template_dir('tpl_modules_testimonials.php',DIR_WS_TEMPLATE, $current_page_base,'templates'). '/tpl_modules_testimonials.php');
}
?>