Skip to main content
edited tags
Link
avpaderno
  • 97.9k
  • 15
  • 164
  • 284
added 143 characters in body
Source Link
Potney Switters
  • 1.8k
  • 3
  • 28
  • 42

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, 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.

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 outside? Having as parent only the html element?

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.

deleted 5 characters in body
Source Link
AjitS
  • 10.9k
  • 7
  • 41
  • 73

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 outside? Having as parent only the html element?

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 outside? Having as parent only the html element?

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 outside? Having as parent only the html element?

Source Link
Potney Switters
  • 1.8k
  • 3
  • 28
  • 42
Loading