Vox Populi(x) forum

Alexandria Book Library => Supporto (Support) => Topic started by: Brain on 09 May 2012, 06:50:49

Title: Page title for book
Post by: Brain on 09 May 2012, 06:50:49
Hi
fedrica thanks for the new update
can you correct the Page title so that it displays the book name in page title ,like in the Abook version for Joomla 1.5. as shown in demo for the component.

It is displaying only menu name and category name in title I am using Joomla 2.53 and the latest version of component.
Thank you in advance  federica
Title: Re: Page title for book
Post by: federica on 09 May 2012, 11:10:06
Hi Brain,
thank you for your notice.
You can fix this bug.
Open the file <your_site>/components/com_abook/views/book/view.html.php and modify the row 176
from:
$title = $this->params->get('page_title', $this->params->get('comp_name'))." ".$this->book->category_title;

                if (empty($title)) {
                        $title = htmlspecialchars_decode($app->getCfg('sitename'));
                }
                elseif ($app->getCfg('sitename_pagetitles', 0)) {
                        $title = JText::sprintf('JPAGETITLE', htmlspecialchars_decode($app->getCfg('sitename')), $title);
                }

to:
$title = $this->params->get('page_title', '');
                if (empty($title)) {
                        $title = $this->book->cat_title." - ".$this->book->title;
                }elseif ($app->getCfg('sitename_pagetitles', 0) == 1) {
                        $title = $this->params->get('comp_name').' - '.$this->book->category_title." - ".$this->book->title;
                }elseif ($app->getCfg('sitename_pagetitles', 0) == 2) {
                        $title = $this->book->category_title." - ".$this->book->title.' - '.$this->params->get('comp_name');
                }else{
                        $title = $this->params->get('page_title', '').' - '.$this->book->category_title." - ".$this->book->title;
                }
Title: Re: Page title for book
Post by: Brain on 09 May 2012, 20:39:59
Quote from: federica on 09 May 2012, 11:10:06
Hi Brain,
thank you for your notice.
You can fix this bug.
Open the file <your_site>/components/com_abook/views/book/view.html.php and modify the row 176
from:
$title = $this->params->get('page_title', $this->params->get('comp_name'))." ".$this->book->category_title;

                if (empty($title)) {
                        $title = htmlspecialchars_decode($app->getCfg('sitename'));
                }
                elseif ($app->getCfg('sitename_pagetitles', 0)) {
                        $title = JText::sprintf('JPAGETITLE', htmlspecialchars_decode($app->getCfg('sitename')), $title);
                }

to:
$title = $this->params->get('page_title', '');
                if (empty($title)) {
                        $title = $this->book->cat_title." - ".$this->book->title;
                }elseif ($app->getCfg('sitename_pagetitles', 0) == 1) {
                        $title = $this->params->get('comp_name').' - '.$this->book->category_title." - ".$this->book->title;
                }elseif ($app->getCfg('sitename_pagetitles', 0) == 2) {
                        $title = $this->book->category_title." - ".$this->book->title.' - '.$this->params->get('comp_name');
                }else{
                        $title = $this->params->get('page_title', '').' - '.$this->book->category_title." - ".$this->book->title;
                }



Thankyou its solved now :)