Add some html/js code to pages via hooks
Add this code to site.php file:
Am_Di::getInstance()->hook->add(Am_Event::AFTER_RENDER, function (Am_Event_AfterRender $event) { static $contentAdded = false; if ($contentAdded) return;
// Do it only for a specific URL. if (!preg_match('#^/amember/helpdesk/index.*#i', $_SERVER['REQUEST_URI'])) { return; }
$contentAdded = (bool)$event->replace( '#(<h1>Tickets.*</h1>)#i', '$1<div>Some content</div>', 1 );});Copyright © 2002–2026 www.amember.com. All Rights Reserved.