Customize Page Title

GK User
Thu Nov 19, 2015 8:39 pm
How can I customize the text that shows up in the black box on each page? It looks strange have the page title and the article title the same.

I added a custom page heading on the menu item and set Show Page Heading to yes, but it still itsn't overriding the article title.

Thanks,
John
User avatar
Senior Boarder

GK User
Thu Nov 19, 2015 9:07 pm
Changing this line from the default.php located in the templates/university/layouts/ folder:
$header_text = $active_menu_item->params->get('menu-anchor_title');

to this:
$header_text = $active_menu_item->params->get('page_heading');

Seem to fix the issue, is this the correct way to solve this problem?

John
User avatar
Senior Boarder

teitbite
Mon Nov 23, 2015 10:38 am
HI

Yes this is a correct modification if You prefer to use page heading instead of the anchor title value.
User avatar
Moderator

GK User
Thu Jan 07, 2016 4:08 pm
I only wanted to change the black box for a few of the pages. I was able to solve this issue without hacking up core code. I did this:

Menu Item > Link Type > Link Type Attribute field

When I added the desired page black box name to Link Type Attribute field, the change was reflected in the black box and the menu item stayed the same.

Much easier unless you want to replace all pages I suppose.
User avatar
Senior Boarder

teitbite
Sun Jan 10, 2016 7:31 pm
Hi

Ok, but I think this would only affect menu element and the thread main question was to change page title. Or is it an attribute to override page title ?
User avatar
Moderator

GK User
Tue Jan 26, 2016 9:44 pm
No this changes the page title, but menu item stays the same. It works, try it.
User avatar
Senior Boarder

teitbite
Tue Feb 02, 2016 10:56 am
Hi

Ok. Great this worked :) Closing this thread than.
User avatar
Moderator


cron