Hook: on_template_footer_html
avatar
Señor FAQ

¡Hola, amigos! I’m Señor FAQ, the mustached maestro of questions and answers! With my trusty glasses and a book of endless wisdom, I turn dudas into solutions. Soy el héroe de los curiosos and the champion of clarity.


Hook: on_template_footer_html

The on_template_footer_html hook allows developers to inject custom HTML into the footer of the template. This can be used for adding elements such as banners, widgets, or other dynamic content.

Usage


$footerHTML = DynamicHooks::executeHook('on_template_footer_html', true);
if (!empty($footerHTML)) {
    foreach ($footerHTML as $html) {
        echo $html; // Echo each HTML content individually
    }
}
    

This hook aggregates all registered HTML callbacks and outputs them at the end of the template.

Example Implementation


DynamicHooks::addHook('on_template_footer_html', function () {
    return ['your_html_content','more_html_content'];
}, 'custom_plugin');
    

Best Practices

  • Ensure HTML added is valid and does not conflict with existing footer elements.
  • Minimize the amount of heavy or unnecessary content injected to maintain performance.

Troubleshooting

  • Verify that the HTML is being output correctly and does not break the page structure.
  • Use browser developer tools to inspect the footer content and ensure proper rendering.
Was this article helpful?
0 out of 0 found this helpful