Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

Archive /

Our old forums are still available as a read-only archive.

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo

Removing Page Titles


Go to End


3 Posts   2731 Views

Avatar
lenwood

Community Member, 18 Posts

18 February 2008 at 7:55am

Hi All,
I'm in the process of customizing my SS site, and I'd like to remove the page title from each page. As it is right now, when someone clicks 'Home' on my site, that selection on the nav menu is highlighted, the browser header says 'Home', and its an H2 tag at the top of the content. Thats too much Home for me. I've searched through the code, and I can't find the piece I'm looking for.

Here's what I'd like:
Browser header = Site Name | Home
Nav Bar = 'Home' is highlighted
H2 Tag = 'Welcome to Site Name'

Any help with this is much appreciated.

Avatar
Willr

Forum Moderator, 5523 Posts

18 February 2008 at 11:51am

If you are using the blackcandy theme then open themes/blackcandy/templates/Page.ss and look for $MetaTags in the head section. If you want a custom title you can pass MetaTags false and write your own

$MetaTags(false)
<title>$Title | My Super Awesome Site</title>

The h2 title is controlled within the CMS. You can change it to whatever you want.

Avatar
Jayson

Community Member, 2 Posts

7 June 2008 at 9:10am

I am brand new to SilverStripe as of yesterday but faced this same question, and solved it, and thought I would share my learning for others.

Ok I got a site up quickly then installed a theme and wanted to get rid of the word "Home" in the title bar of the browser, and also the word "Home" that appeared on the top of my home page itself. It took me soooooo long to figure this out . the answer from the previous poster works perfect for changing the Title bar text (thanks!!). Now, as for word "Home" stuck on the top of my home page... you need to read the Basic Tutorial and follow each step about creating a home page that is different from the other pages. However since I had installed a theme, instead of creating HomePage.php in tutorial/code, I created it in mysite/code. And instead of creating HomePage.ss in tutorial/templates I created it in themes/mytheme/templates. But actually I didn't even do that. I just went into themes/mytheme/templates/layout and copied Page.ss to HomePage.ss, then commented out the lines that added the word "Home" like this:
<!-- <div class="header">
<h3>$Title</h3>
</div> -->

Sounds easy now and you experts are reading this and thinking what a goofball but it took a lot of searching to figure this out. Hope it benefits someone.