Title Tag - Website name is before the Phoca Gallery page.

Phoca Gallery - image gallery extension
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 49144
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Title Tag - Website name is before the Phoca Gallery pag

Post by Jan »

Hi, see e.g. categories view:
components\com_phocagallery\views\categories\view.html.php

at the bottom, you can see:

Code: Select all

protected function _prepareDocument() {
In this method, the title tag is defined, now it is:

Code: Select all

$menu = $menus->getActive();
		if ($menu) {
			$this->params->def('page_heading', $this->params->get('page_title', $menu->title));
		} else {
			$this->params->def('page_heading', JText::_('JGLOBAL_ARTICLES'));
		}
		$title = $this->params->get('page_title', '');		
		if (empty($title)) {
			$title = htmlspecialchars_decode($app->getCfg('sitename'));
		} else if ($app->getCfg('sitename_pagetitles', 0)) {
			$title = JText::sprintf('JPAGETITLE', htmlspecialchars_decode($app->getCfg('sitename')), $title);
		}
		$this->document->setTitle($title);
This code you can change to fit your needs, I will take a look at it for next version, and compare it with core extensions, so it will be unique, thank you for the info.

Jan
If you find Phoca extensions useful, please support the project
nemmar
Phoca Enthusiast
Phoca Enthusiast
Posts: 63
Joined: 13 Mar 2014, 18:55

Re: Title Tag - Website name is before the Phoca Gallery pag

Post by nemmar »

Hi Jan,

I don't know much about how to edit source code since I am not a programmer.

Can you tell me exactly what I need to edit to put the include the site name in page Title Tags after the Phoca Gallery page name?

Thanks for any advice.
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 49144
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Title Tag - Website name is before the Phoca Gallery pag

Post by Jan »

Hi, can you describe me exactly what you have set and what you exactly get there.

If I set page title in menu link options, I get only page title as TITLE tag when I don't set it I get the menu link title but I don't understand correctly what you mean with two values there :idea:

Jan
If you find Phoca extensions useful, please support the project
nemmar
Phoca Enthusiast
Phoca Enthusiast
Posts: 63
Joined: 13 Mar 2014, 18:55

Re: Title Tag - Website name is before the Phoca Gallery pag

Post by nemmar »

Hi Jan,

I have the site name setting: Global Configuration > Site Settings > Site Name
Then I have the SEO Page Title setting: Global Configuration > SEO settings > Include Site Name in Page Titles > After

1) You get the following Title Tag with the "Page Title - Global Config Site Name":
<title>abcde Directory Search - CLONE TEST SITE - abcde.com</title>

1a) You get the following Title Tag with the "Page Title - Global Config Site Name":
<title>Louisiana LA - CLONE TEST SITE - abcde.com</title>

2) The problem is that on any of the Phoca Gallery pages, the Title Tag is reversed.
You get the following Title Tag which is backwards - "Global Config Site Name - Page Title":
<title>CLONE TEST SITE - abcde.com - abcde Photos Pictures</title>

BUT you should get that Title Tag displaying the following:
<title>abcde Photos Pictures - CLONE TEST SITE - abcde.com</title>

2a) You get the following Title Tag which is backwards - "Global Config Site Name - Page Title":
<title>CLONE TEST SITE - abcde.com - abcde Photos Pictures - 0026 abcde</title>

BUT you should get that Title Tag displaying the following:
<title>0026 abcde - abcde Photos Pictures - CLONE TEST SITE - abcde.com</title>

Let me know if you need more details.
Thanks.
Last edited by nemmar on 01 Oct 2014, 01:27, edited 1 time in total.
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 49144
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Title Tag - Website name is before the Phoca Gallery pag

Post by Jan »

Hi, thank you for the info, so this seems, this is some feature which is not implemented in Phoca Gallery.

I will take a look at it for next version and will try to implement this.

Thank you very much for the info.

Jan
If you find Phoca extensions useful, please support the project
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 49144
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Title Tag - Website name is before the Phoca Gallery pag

Post by Jan »

Hi, set in Phoca Gallery 4.1.2

Jan
If you find Phoca extensions useful, please support the project
nemmar
Phoca Enthusiast
Phoca Enthusiast
Posts: 63
Joined: 13 Mar 2014, 18:55

Re: Title Tag - Website name is before the Phoca Gallery pag

Post by nemmar »

Jan wrote:Hi, set in Phoca Gallery 4.1.2
Hi Jan,

Did you post an update for Phoca Gallery version 4.1.2 with the title tag fixed?

I checked the PG component download page and it only lists PG version 4.1.1
https://www.phoca.cz/download/category/1 ... -component

Is the 4.1.2 version still in beta?

Thanks.
sandralambert
Phoca Newbie
Phoca Newbie
Posts: 1
Joined: 21 Oct 2014, 15:05
Contact:

Re: Title Tag - Website name is before the Phoca Gallery pag

Post by sandralambert »

Can you tell me where and how I should edit the two output files to fix the reversed Title Tags?

components\com_phocagallery\views\categories\tmpl\default.php
components\com_phocagallery\views\category\tmpl\default.php
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 49144
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Title Tag - Website name is before the Phoca Gallery pag

Post by Jan »

Hi,
Is the 4.1.2 version still in beta?
I have answered the posts in forum first, then I have checked if all issues were answered and all problems fixed (last check) and then I have uploaded the component, so it (publishing the component) was some minutes after this post was made.

Jan
If you find Phoca extensions useful, please support the project
nemmar
Phoca Enthusiast
Phoca Enthusiast
Posts: 63
Joined: 13 Mar 2014, 18:55

Re: Title Tag - Website name is before the Phoca Gallery pag

Post by nemmar »

Hi Jan,

I just upgraded to Phoca Gallery 4.1.2.

I tested out my Phoca pages and there is still a problem with the Title Tags.

Now Phoca Gallery 4.1.2 is putting the Menu Item Title at the beginning of the page Title Tags.

Is that what you wanted the fix to do? On all my other site pages (non-Phoca pages) the Page/Article Title is first followed by the Website Name in the Title Tags.

Can you update Phoca Gallery 4.1.2 so that the Title Tags have the Photo/Image Title followed by the Website Name in the Title Tags (remove the Menu Item Titles)?

Thanks!
Post Reply