WebsiteBaker Logo
  • *
  • Templates
  • Help
  • Add-ons
  • Download
  • Home
*
Welcome, Guest. Please login or register.

Login with username, password and session length
 

News


WebsiteBaker 2.13.8 is now available!


R.I.P Dietmar (luisehahne) and thank you for all your valuable work for WB
https://forum.websitebaker.org/index.php/topic,32355.0.html


* Support WebsiteBaker

Your donations will help to:

  • Pay for our dedicated server
  • Pay for domain registration
  • and much more!

You can donate by clicking on the button below.


  • Home
  • Help
  • Search
  • Login
  • Register

  • WebsiteBaker Community Forum »
  • WebsiteBaker Support (2.8.x) »
  • Templates, Menus & Design »
  • Hide page title
  • Print
Pages: [1]   Go Down

Author Topic: Hide page title  (Read 4135 times)

Offline Tinke

  • Posts: 32
Hide page title
« 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?

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

This code make to image gallery pages "no title" and every other pages this html code
Code: [Select]
My page title<div class="title"></div>But html-code should be this
Code: [Select]
<div class="title">My page title</div>
What i am doing wrong  :? :? :? :? :? :? :? :? :? :? :x :x :x :x :x
Please help meeeeeeeee.

Regards,
Tinke
Logged

Offline DarkViper

  • Forum administrator
  • *****
  • Posts: 3087
  • Gender: Female
Re: Hide page title
« Reply #1 on: November 28, 2009, 01:11:44 AM »
try this

Code: [Select]
<?php
if( strpos( $_GLOBALS[&#39;wb&#39;]->page[&#39;link&#39;], &#39;/gallery&#39; ) == 0 )
{
    echo &
#39;NO_TITLE&#39;;
}
else
{
    echo &
#39;<div class="title">&#39;.PAGE_TITLE.&#39;</div>&#39;;
}
?>
Logged
Der blaue Planet - er ist nicht unser Eigentum - wir haben ihn nur von unseren Nachkommen geliehen

"We need education to cope with digitalization - and NOT the digitalization of education.!"

Tägliches Stoßgebet: Oh Herr, wirf Hirn vom Himmel !

dfhectik

  • Guest
Re: Hide page title
« Reply #2 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.
Logged

Offline DarkViper

  • Forum administrator
  • *****
  • Posts: 3087
  • Gender: Female
Re: Hide page title
« Reply #3 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.
Logged
Der blaue Planet - er ist nicht unser Eigentum - wir haben ihn nur von unseren Nachkommen geliehen

"We need education to cope with digitalization - and NOT the digitalization of education.!"

Tägliches Stoßgebet: Oh Herr, wirf Hirn vom Himmel !

  • Print
Pages: [1]   Go Up
  • WebsiteBaker Community Forum »
  • WebsiteBaker Support (2.8.x) »
  • Templates, Menus & Design »
  • Hide page title
 

  • SMF 2.0.19 | SMF © 2017, Simple Machines
  • XHTML
  • RSS
  • WAP2