function hook_page_top
hook_page_top(array &$page_top)
Add a renderable array to the top of the page.
Parameters
array $page_top: A renderable array representing the top of the page.
Related topics
- Hooks
- Define functions that alter the behavior of Drupal core.
File
- core/lib/Drupal/Core/Render/theme.api.php, line 1054
- Hooks and documentation related to the theme and render system.
Code
function hook_page_top(array &$page_top) { $page_top['mymodule'] = ['#markup' => 'This is the top.']; }
© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/core!lib!Drupal!Core!Render!theme.api.php/function/hook_page_top/8.1.x