Remove Site name from Titles?

More
4 years 4 months ago #1420 by Magh
Hi,

I have configured the site's name to be appended to the end of the page titles. So if I use Geek Masthead to display titles automatically, it draws its data from the page title and that includes the site name.

Is there a way to get rid of that in the module without altering the general configuration of the site?
Or, could the module be modified to draw its data optionally from the page headings (which can be set in menu items) instead?

Please Log in or Create an account to join the conversation.

More
4 years 4 months ago #1421 by Thanh Nguyen
Hello Magh,

You can try solution below if it help to remove site name from page title:
1. Open the file:
modules/mod_geekmasthead/mod_geekmasthead.php

2. Find a code line:
Code:
$title = $doc->getTitle();

3. Add the code block below right after it:
Code:
$parts = explode('-', $title); $title = $parts[0];

4. Save change and test again if it works.

Thanh Nguyen
Founder & Lead Developer
The following user(s) said Thank You: Magh

Please Log in or Create an account to join the conversation.

More
4 years 4 months ago #1424 by Magh
Replied by Magh on topic Remove Site name from Titles?
Worked perfect, thanks!

Is this module going to be supported in Joomla 4?

I would also l like to recommend an improvement: in the module's options for colours, to be able to enter rgba values.

Please Log in or Create an account to join the conversation.