'ModuleName', 'version' => 100, 'summary' => '', 'href' => '', 'singular' => true, 'autoload' => true ); } public function init() { // add a hook after each page is rendered and modify the output $this->addHookAfter('Page::render', $this, 'example2'); } public function example2($event) { $page = $event->object; // don't add this to the admin pages if($page->template == 'admin') return; // add a "Hello World" paragraph right before the closing body tag $event->return = str_replace("", "

Hello World!

", $event->return); } }