Change the separator in the browser page titles Topic is solved
Moderator: General Support Moderators
Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Forum Post Assistant - If you are serious about wanting help, you will use this tool to help you post.
Windows Defender SmartScreen Issues <-- please read this if using Windows 10.
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Forum Post Assistant - If you are serious about wanting help, you will use this tool to help you post.
Windows Defender SmartScreen Issues <-- please read this if using Windows 10.
-
- Joomla! Enthusiast
- Posts: 204
- Joined: Mon Aug 22, 2005 10:10 am
Change the separator in the browser page titles
Currently the Site Name in Page Titles is hyphen
ie Title - Site Name is there a way to change the - to a | Title | Site Name. The seo's company I am working with have requested this and the only way i can see to do this is to off this feature and manually add the titles.
I have had this request from several SEO companies on different site so this would be very useful
would this be possible via language overrides ?
Appreciate any help
ie Title - Site Name is there a way to change the - to a | Title | Site Name. The seo's company I am working with have requested this and the only way i can see to do this is to off this feature and manually add the titles.
I have had this request from several SEO companies on different site so this would be very useful
would this be possible via language overrides ?
Appreciate any help
- pe7er
- Joomla! Master
- Posts: 24974
- Joined: Thu Aug 18, 2005 8:55 pm
- Location: Nijmegen, Netherlands
- Contact:
Re: Change the separator in the browser page titles
So you want to change the hyphen "-" in the Browser Page Title <title></title> to a pipe "|" symbol?
You can change the HTML output of Joomla using a plugin.
In this case you might look into a plugin called: ReReplacer
https://extensions.joomla.org/extension ... ereplacer/
You can change the HTML output of Joomla using a plugin.
In this case you might look into a plugin called: ReReplacer
https://extensions.joomla.org/extension ... ereplacer/
Kind Regards,
Peter Martin, Global Moderator
Company website: https://db8.nl/en/ - Joomla specialist, Nijmegen, Netherlands
The best website: https://the-best-website.com
Peter Martin, Global Moderator
Company website: https://db8.nl/en/ - Joomla specialist, Nijmegen, Netherlands
The best website: https://the-best-website.com
-
- Joomla! Enthusiast
- Posts: 204
- Joined: Mon Aug 22, 2005 10:10 am
Re: Change the separator in the browser page titles
Hi, Thanks, For you input, I have been reading the documentation For ReReplacer Looks like its the tool for the job But i would not know where to start. I have searched the language files looking for a place holder for the hyphen there are quite few, but none seem to be related to the page titles. I would assume its part of the code in the relevant php file which I have no idea about. I would be happy to buy the plugin but would need to know how to configure the change.
- AMurray
- Joomla! Exemplar
- Posts: 9707
- Joined: Sat Feb 13, 2010 7:35 am
- Location: Australia
Re: Change the separator in the browser page titles
ReReplacer doesn't touch the database or PHP files - it doesn't work that way and you don't need to go digging into the code. The documentation explains it fairly simply.
I think the key point is you have to tell it where you want to search within the HTML document:
Examples:
Go to "Search Areas" tab and select "Head" option from the "Enable in Area" drop-down list.
Back in the "Details" tab, type in the search string to look for (the bit you want to replace)
e.g. " Mary's Puppy Training - Dalmatians"
Type in the string of text you want to replace the above with e.g. "Mary's Puppy Training | Dalmatians"
OR you could replace specific portions of the above, such as only replacing the bit after the hyphen like replace " - Dalmatians " with "| Dalmatians".
You could also search and replace the entire line of HTML (the <title> tag line) but in this instance wouldn't be necessary.
Refresh the front-end of your site (F5/Ctrl+F5) and see the browser title has changed from the hyphen to the pipe symbol.
You don't need the Pro version for this, ReReplacer is free from the JED.
I think the key point is you have to tell it where you want to search within the HTML document:
Examples:
Go to "Search Areas" tab and select "Head" option from the "Enable in Area" drop-down list.
Back in the "Details" tab, type in the search string to look for (the bit you want to replace)
e.g. " Mary's Puppy Training - Dalmatians"
Type in the string of text you want to replace the above with e.g. "Mary's Puppy Training | Dalmatians"
OR you could replace specific portions of the above, such as only replacing the bit after the hyphen like replace " - Dalmatians " with "| Dalmatians".
You could also search and replace the entire line of HTML (the <title> tag line) but in this instance wouldn't be necessary.
Refresh the front-end of your site (F5/Ctrl+F5) and see the browser title has changed from the hyphen to the pipe symbol.
You don't need the Pro version for this, ReReplacer is free from the JED.
Regards - A Murray
General Support Moderator
General Support Moderator
-
- Joomla! Enthusiast
- Posts: 204
- Joined: Mon Aug 22, 2005 10:10 am
Re: Change the separator in the browser page titles
Hi, Thanks to both of you, so simple. Typically I started from point of complexity and totally missed the simple and the obvious. Many thanks again.
- AMurray
- Joomla! Exemplar
- Posts: 9707
- Joined: Sat Feb 13, 2010 7:35 am
- Location: Australia
Re: Change the separator in the browser page titles
Glad the solution worked.
Regards - A Murray
General Support Moderator
General Support Moderator
-
- I've been banned!
- Posts: 13
- Joined: Wed Feb 10, 2021 10:05 am
Re: Change the separator in the browser page titles
The replacements are rendered on-the-fly with ReReplacer, keeping the actual text or HTML untouched. DB Replacer can be used either if you like or need to completely replace anything in your website's database.
- pe7er
- Joomla! Master
- Posts: 24974
- Joined: Thu Aug 18, 2005 8:55 pm
- Location: Nijmegen, Netherlands
- Contact:
Re: Change the separator in the browser page titles
An easier method (thanks Pablo Arias, for pointing me to this solution!) is described here:
https://stackoverflow.com/a/24039174/2027591
https://stackoverflow.com/a/24039174/2027591
Create a language override for JPAGETITLE constant. Change
%1$s - %2$s
to
%1$s | %2$s
Kind Regards,
Peter Martin, Global Moderator
Company website: https://db8.nl/en/ - Joomla specialist, Nijmegen, Netherlands
The best website: https://the-best-website.com
Peter Martin, Global Moderator
Company website: https://db8.nl/en/ - Joomla specialist, Nijmegen, Netherlands
The best website: https://the-best-website.com