Hooks/public theme page content

Allows you to inject content at the top of the page's "content" area for public themes.

This hook receives the request object as the first argument, which allows the plugin writer to tailor the header output to a specific request (specific controller, action, etc.).

Arguments

Zend_Controller_Request_Http $request {{#if
| (optional)}}
{{#if: | Default: {{{default}}}}}

Example(s)

Old style (pre-1.5)

add_plugin_hook('public_theme_page_content', 'my_plugin_public_theme_page_content');
function my_plugin_public_theme_page_content($request)
{
    echo "Content";
}

New style (1.5 and above)

class MyPlugin extends Omeka_Plugin_Abstract
{
    protected $_hooks = array(
        'public_theme_page_content',
    );
 
    public function hookPublicThemePageContent($request)
    {
        echo "Content";
    }
 
}
 
$myplugin = new MyPlugin();
$myplugin->setUp();

Version History

  • Added in Omeka 1.4