Using custom template helpers

Modules that provide template helpers must implement the DMBridgeTemplateHelperModule interface, which defines a single method, getTemplateHelper(). Your getTemplateHelper() method should return an instance of your custom template helper class, which itself should implement DMTemplateHelper.

When calling module template helpers, be aware that the module with which they work may be unavailable from time to time, for whatever reason. It is therefore important to call them safely, by first checking to make sure the module is enabled:

<?php if (DMModuleManager::getInstance()->isModuleEnabled("MyModule")): ?>
    <?php echo $view->getHelper()->doSomething() ?>
<?php endif ?>