Figured I'd post this here so others can learn from it. I'm trying to register a plugin (in the gateway class) against the template display hook you mentioned (TemplateManager::display in classes/template/TemplateManager.inc.php). Specifically, I'm trying to get access to the $additionalHeadData variable when the plugin is registered (to append it with atom/rss feed info).
I'm trying:
- Code: Select all
function register($category, $path) {
$success = parent::register($category, $path);
if ($success) {
HookRegistry::register('TemplateManager::display',array(&$this, 'writeMeta'));
$this->addLocaleData();
return true;
}
return false;
}
But this doesn't seem to be hitting the callback function (writeMeta). I'm sure I'm doing something trivially wrong, but I can't seem to figure it out. Have you got an example of using the hook to do this?
Thanks,
MJ
