I have a custom route and module that outputs content to a page.
I want to also have a page/content title/header on the page. I've figured out how to set the browser title, but I can't figure out how to add the headline title.
When creating a basic page with no custom template, the headline is part of that html. I want to replicate this.
Here is what I have in my controller:
return array( '#title' => 'This sets the browser title', '#markup' => 'This is the html output', );
I've been banging my head on this for a few days now... help!
I've already tried setting
theme_preprocess_page_title, but that doesn't seem to get called. I've also tried it in
preprocess_page, but that does nothing.
To clarify - I am wanting to change the text that is by default displayed in
<h1 class="page-header"> from within my controller.