WebsiteBaker Community Forum (upd)

WebsiteBaker Support (2.8.x) => Templates, Menus & Design => Topic started by: Tinke on November 27, 2009, 08:08:27 PM

Title: Hide page title
Post by: Tinke on November 27, 2009, 08:08:27 PM
Hello everybody!
I have small problem. I would like to hide the title, image gallery pages.
But how?

<?php
$path_parts 
pathinfo($_SERVER['REQUEST_URI']);
if (
$path_parts['dirname']=="/pages/gallery")
  echo 
"NO TITLE";
else
echo 
'<div class="title">'.page_title('','[PAGE_TITLE]').'</div>';
?>


This code make to image gallery pages "no title" and every other pages this html code
My page title<div class="title"></div>
But html-code should be this
<div class="title">My page title</div>

What i am doing wrong  :? :? :? :? :? :? :? :? :? :? :x :x :x :x :x
Please help meeeeeeeee.

Regards,
Tinke
Title: Re: Hide page title
Post by: DarkViper on November 28, 2009, 01:11:44 AM
try this

<?php
if( strpos$_GLOBALS['wb']->page['link'], '/gallery' ) == )
{
    echo 
'NO_TITLE';
}
else
{
    echo 
'<div class="title">'.PAGE_TITLE.'</div>';
}
?>
Title: Re: Hide page title
Post by: dfhectik on February 10, 2010, 11:36:10 AM
unfortunatley that echo's NO_TITLE instead of the title.

Perhaps use page id's.
I have a page that i dont want to display any title on, but on all other pages i want to display the title.

i dont know php to good so my attemps just break my website.
Title: Re: Hide page title
Post by: DarkViper on February 10, 2010, 01:15:02 PM

echo 'NO_TITLE';

'NO_TITLE' is a synonym for a hardcoded title-string only....
you can replace the text between the apostrophs with whatever you want...  also leave it empty like '' too.