Page title in categories and files
Posted: 18 Oct 2011, 10:25
I observed that page title in all PD v2.1.1 component is the same - menu title linked to PD. This is not good at all.
So, in
/components/com_phocadownload/views/file/view.html.php
if found this piece of code
First question I have, why $this->document->setTitle($title); is set 2 times. I simply disabled it the first line.
Second, I could not figure out the source of the title, and just set the second $this->document->setTitle($title); to
The same refers to category titles set in /components/com_phocadownload/views/category/view.html.php
So, in
/components/com_phocadownload/views/file/view.html.php
if found this piece of code
Code: Select all
$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);
if (empty($title)) {
$title = $this->item->title;
}
$this->document->setTitle($title);
Second, I could not figure out the source of the title, and just set the second $this->document->setTitle($title); to
Code: Select all
$this->document->setTitle($file->title);