Page 1 of 1

Title don't showingup

Posted: 22 Jul 2012, 18:14
by kycu
Hello

I've got J! 2.5 and new Phoca Guestbook.

I setup guestbook into website menu and guestbook title don't showingup over whole book (like componentheading should). I don't know why. It's a fresh install. Even in menu parametrs I set "Show menu title: Yes" it doesn't work.

Another problem. Why guestbook title don't show webpage name on top web browser bar? i've got set in global configuration to show website name before articles, components titles... but it shows me only a guestbook name :roll: without webpage name...

I can't show website. It's on my localhost computer

Thanks for help,
Peter

Re: Title don't showingup

Posted: 22 Jul 2012, 18:31
by Jan
Hi, you can customize the displaying of the title here:

components\com_phocaguestbook\views\guestbook\tmpl\default.php

Jan

Re: Title don't showingup

Posted: 22 Jul 2012, 18:54
by kycu
Thanks for answer Jan

but in file default.php exist code

Code: Select all

if ( $this->params->get( 'show_page_heading' ) ) { 
	echo '<h1>'. $this->escape($this->params->get('page_heading')) . '</h1>';
}
but doesn't work well! I don't know why.

So I added own code to resolve my problem ;) I repair it on example from another component so I add code after this

Code: Select all

// - - - - - - - - - - -
// Header
// - - - - - - - - - - -
echo '<div id="phocaguestbook" class="guestbook'.$this->params->get( 'pageclass_sfx' ).'">';
added

Code: Select all

$document =& JFactory::getDocument(); 
$app	= JFactory::getApplication();

$gbtitle = $document->getTitle();
$title = $app->getCfg('sitename') .' - '. $document->getTitle();
$document->setTitle( $title); 

echo '<h1 class="guestbook-title">' . $gbtitle . '</h1>';
Maybe it helps someone :)

Re: Title don't showingup

Posted: 09 Aug 2012, 07:42
by Jan
Ok