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.'];
}
doc_Drupal
2016-10-29 09:18:25
Comments
Leave a Comment

Please login to continue.