Page 2 of 3
Re: Title Tag - Website name is before the Phoca Gallery pag
Posted: 28 Sep 2014, 23:38
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
Re: Title Tag - Website name is before the Phoca Gallery pag
Posted: 29 Sep 2014, 00:05
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.
Re: Title Tag - Website name is before the Phoca Gallery pag
Posted: 30 Sep 2014, 15:55
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
Jan
Re: Title Tag - Website name is before the Phoca Gallery pag
Posted: 30 Sep 2014, 20:01
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.
Re: Title Tag - Website name is before the Phoca Gallery pag
Posted: 30 Sep 2014, 23:36
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
Re: Title Tag - Website name is before the Phoca Gallery pag
Posted: 20 Oct 2014, 21:24
by Jan
Hi, set in Phoca Gallery 4.1.2
Jan
Re: Title Tag - Website name is before the Phoca Gallery pag
Posted: 20 Oct 2014, 22:08
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.
Re: Title Tag - Website name is before the Phoca Gallery pag
Posted: 21 Oct 2014, 15:10
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
Re: Title Tag - Website name is before the Phoca Gallery pag
Posted: 23 Oct 2014, 15:13
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
Re: Title Tag - Website name is before the Phoca Gallery pag
Posted: 08 Mar 2015, 22:04
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!