Customizing dashboard header title

Re: Customizing dashboard header title

by Simon Denier -
Number of replies: 1
Thanks for the tip.

After digging a bit, in my case I could override full_header or context_header methods in my core_renderer, so that I can customize the heading content.

I just need to customize it on the dashboard, so what's the Moodle way to tell which page is rendering? Simply test $this->page->moodle_url->path ? This seems suggested by this topic https://moodle.org/mod/forum/discuss.php?d=324948#p1305535
In reply to Simon Denier

Re: Customizing dashboard header title

by Mark Sharp -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers
I would use the global $PAGE variable and check the pagetype i.e. $PAGE->pagetype == 'my-index' - my-index is the page type set on the /my page.
Incidentally, you can set a template for your pagetypes in your theme's config.php file, check out the boost/config.php for an example. This means you could have different templates for different pages, if you were so inclined.