Dynamic header/menu

I've got about 10 pages that I'd like to override the title in the header from the global site title to a page specific title, and replace the default 'site' menu items with menu items specific to that page.

What I've tried doing for my mod/page 'art' for example is overriding the header_logo.php file by placing my new header_logo.php file in mod/art/views/default/page/elements/ and as you're probably aware that just overrides the header for ALL pages, so i tried putting it in mod/art/pages/art/elements/ And that didn't work, it didn't change any of the pages. So then I tried putting it back to first location and altering the code to return the current page title rather than the global site title, but I don't know the proper code for this...

 

Here's the original code:

__________

<?php

/**

 * Elgg header logo

 */

 

$site = elgg_get_site_entity();

$site_name = $site->name;

$site_url = elgg_get_site_url();

?>

 

<h1>

<a class="elgg-heading-site" href="<?php echo $site_url; ?>">

<?php echo $site_name; ?>

</a>

</h1>

___________
and my genius idea was to replace the word 'site' with 'page' everytime it appeared, and that didn't work. So what would be the code to insert the current page title instead of the global site title as is the Elgg default operation.
And then part II would be applying this same concept to the menu.
My guess is that I would need to override the header.php
______
<?php
/**
 * Elgg page header
 * In the default theme, the header lives between the topbar and main content area.
 */
// link back to main site.
echo elgg_view('page/elements/header_logo', $vars);
// drop-down login
echo elgg_view('core/account/login_dropdown');
// insert site-wide navigation
echo elgg_view_menu('site');
____________
I've only seen information on creating new menu items, but not new menus.
So here's a summary of the question:
I've got about 10 mod/pages art, business, music, video, etc and I'm looking to be able to either dynamically or manually override the title in the header, and menu in the header either by placing code in each mod specific folder (manually), or by creating a dynamic system that essentially means:
(NOTE: the following is obviously not real coding, I'm using basic language to describe what I want to code to do)
IF page=art 
THEN header title should display "Art"
AND
displays "art" menu (to replace 'site' menu inside header)
IF page=business 
THEN header title should display "Business"
AND
displays "business" menu (to replace 'site' menu inside header)
ETC
Thanks in advance,
Brad Corlett.
Beginning Developers

Beginning Developers

This space is for newcomers, who wish to build a new plugin or to customize an existing one to their liking