Skip to main content
3 of 4
added 143 characters in body
Potney Switters
  • 1.8k
  • 3
  • 28
  • 42

Add HTML code outside content area on every page load

I am trying to add HTML code outside the content area on every page load with the use of:

function us_page_build(&$page) {
  $page['content'][] = array(
    '#markup' => '<div class="fullscreen"><p>Here is my div content!!</p></div>',
  );
}

However, in this way I am placing the element within the content attribute. Is there a way to set it outside, having as parent only the html element? I am aware I can paste code into the template files, but then if I switch to another template(which I will) I will need to re-enter it.

Potney Switters
  • 1.8k
  • 3
  • 28
  • 42