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.

Installing SilverStripe /

Getting SilverStripe up and running on your computer and on your web server.

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

problems getting the title tags to render properly


Go to End


11 Posts   4296 Views

Avatar
KeslowCamera

Community Member, 8 Posts

5 August 2009 at 11:29am

so, we've just launched our new site (www.keslowcamera.com), and for some reason the title tags aren't being read by the browser (hence, instead of the page name in the browser window, you see the URL).

The source code is showing the following:

<!--<title>Keslow Camera : Film &amp; Digital Camera Rentals</title>
<meta name="generator" http-equiv="generator" content="SilverStripe 2.0 - http://www.silverstripe.com" >
<meta http-equiv="Content-type" content="text/html; charset=utf-8" >
<meta name="keywords" http-equiv="keywords" content="keslow camera, keslow, robert keslow, red one cameras, red one camera, red one camera rental, red pro primes, red pro prime, red one camera rentals, 4K Camera rental, red one rental, red one rentals, red camera rental, red camera rentals, red one, red cam" >
<meta http-equiv="Content-Language" content="en">
-->

I've saved the page to my desktop and deleted the extra "<!-- " and "--> " elements, and it renders the title tag correctly.

So the question is, how do I delete those tags in Silverstripe so it doesn't effect every page of my site?

Thanks for any and all help!

Avatar
KeslowCamera

Community Member, 8 Posts

5 August 2009 at 11:32am

forgot to mention...we're running this on version 2.2.2 (I know, we should have upgraded to the lastest stable build at the time we were developing 2.3.1...that will be the next question I'll be posting-how to successfully upgrade :)

Avatar
Hamish

Community Member, 712 Posts

6 August 2009 at 12:35pm

Have a look at your theme template Page.ss - are the comment elements there too?

Avatar
KeslowCamera

Community Member, 8 Posts

7 August 2009 at 5:35am

thanks for the response, Hamish. The Page.ss file has the following code:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" >
<head>
<% base_tag %>
<!--$MetaTags-->
<meta http-equiv="Content-type" content="text/html; charset=iso-8859-1" />
<meta name="verify-v1" content="r9Pmfl8vd5ofySsKBn9HsktkuiR79Qb4MhcZXcEtM+8=" >
<meta http-equiv="Content-Language" content="en"/>
<link rel="shortcut icon" href="http://www.keslowcamera.com/favicon.ico" />
<link rel="stylesheet" type="text/css" href="/themes/keslowcameraobsidian/css/default.css" />
<script type="text/javascript" src="/themes/keslowcameraobsidian/js/script.js"></script>
</head>
<body>
<div id="pageglobal">

<div id="branding">
<div class="header_left"></div>
<div class="header_center"><a href="home"><img src="/themes/keslowcameraobsidian/images/logo.jpg" style="border: 0"></a></div>
<div class="header_right">$SearchForm</div>
</div>

<div id="nav">
<ul class="main_menu">
<li id="company" onmouseover="showsubmenu()" onmouseout="hidesubmenu()"></li>
<li id="rental_catalog"> <a href="rental-catalog/"><div></div></a></li>
<li id="customer_center"> <a href="customer-center/"><div></div></a></li>
<li id="gallery"> <a href="photo-gallery/"><div></div></a></li>
<li id="credits"> <a href="credits/"><div></div></a></li>
<li id="blog"> <a href="blog/"><div></div></a></li>
<li id="contact"> <a href="contact/"><div></div></a></li>
</ul>
<div id="submenu" class="submenu" onmouseover="showsubmenu()" onmouseout="hidesubmenu()">
<ul>
<li><a href="company/">COMPANY&nbsp;PROFILE</a></li>
<li><a href="employment/">EMPLOYMENT</a></li>
<li><a href="in-the-press/">IN&nbsp;THE&nbsp;PRESS</a></li>
</ul>
</div>
</div>

<div id="content">

<div id="MainBar">
$Layout
</div>

</div>

<div id="Footer">
<% include Footer %>
</div>

</div>

</body>
</html>
------------------------
any of that look like the culprit??

Thanks again!!

Avatar
Hamish

Community Member, 712 Posts

7 August 2009 at 8:58am

Yep, there it is:

<!--$MetaTags-->

Take out the comment tags, just leave it as:

$MetaTags

Avatar
KeslowCamera

Community Member, 8 Posts

7 August 2009 at 9:39am

Genius, Hamish! Thanks heaps for your help

Avatar
KeslowCamera

Community Member, 8 Posts

8 August 2009 at 8:39am

ok, here's another questions regarding this same set of code. If you look in my top post, it lists the following for "keywords":

<meta name="keywords" http-equiv="keywords" content="keslow camera, keslow, robert keslow, red one cameras, red one camera, red one camera rental, red pro primes, red pro prime, red one camera rentals, 4K Camera rental, red one rental, red one rentals, red camera rental, red camera rentals, red one, red cam" >

however, this is only a portion of the keywords we've entered into the meta tab in the CMS.

Is there any way to loosen the restriction on characters allowed in Silverstripe? Do I need to edit the Page.ss file again?

Thanks for your help!

Avatar
Willr

Forum Moderator, 5523 Posts

8 August 2009 at 6:54pm

It has a 255 or lower char limit. If you want more change 'MetaKeywords' => 'Varchar(...) to 'MetaKeywords' => 'Text' you should then be able to have upto some crazy amount of keywords - like 4mb.

Go to Top