Jump to:

4952 Posts in 14483 Topics by 1491 members

Installing SilverStripe

SilverStripe Forums » Installing SilverStripe » problems getting the title tags to render properly

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

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

Page: 1 2
Go to End
Author Topic: 2377 Views
  • KeslowCamera
    Avatar
    Community Member
    8 Posts

    problems getting the title tags to render properly Link to this post

    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!

  • KeslowCamera
    Avatar
    Community Member
    8 Posts

    Re: problems getting the title tags to render properly Link to this post

    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

  • Hamish
    Avatar
    Community Member
    712 Posts

    Re: problems getting the title tags to render properly Link to this post

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

  • KeslowCamera
    Avatar
    Community Member
    8 Posts

    Re: problems getting the title tags to render properly Link to this post

    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" 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!!

  • Hamish
    Avatar
    Community Member
    712 Posts

    Re: problems getting the title tags to render properly Link to this post

    Yep, there it is:

    <!--$MetaTags-->

    Take out the comment tags, just leave it as:

    $MetaTags

  • KeslowCamera
    Avatar
    Community Member
    8 Posts

    Re: problems getting the title tags to render properly Link to this post

    Genius, Hamish! Thanks heaps for your help

  • KeslowCamera
    Avatar
    Community Member
    8 Posts

    Re: problems getting the title tags to render properly Link to this post

    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!

  • Willr
    Avatar
    Forum Moderator
    5490 Posts

    Re: problems getting the title tags to render properly Link to this post

    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.

    2377 Views
Page: 1 2
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.