Browser Tab <head><title> (not title in the page) gone

Topics: General, Troubleshooting
Jul 13, 2012 at 8:33 PM

Any thoughts on why my browser tab's <head><title>[Content Page Title Field Input]</title></head> is not showing up anymore.

I have content in my Page's Title field. I have hidden the title from the page using placement because I was using that Title field for SEO. This worked for me in 1.3, but slipped my notice in 1.4. Now it won't show up. I commented out the placement tag that was hiding the page's title from the actual browser page. I've checked the Content.cshtml. I've checked my own .cshtml files in the custom theme I am using. Is there something I have missed?

Jul 14, 2012 at 12:05 PM

Extremely hard to say with what little information you're giving. Please give more info. Title used to be in the Route part in 1.3 and was moved to the Title part in 1.4. Did you do the migration properly? Does the title still appear in the content item editor? Do you have a Document.cshtml template in your theme that would improperly replace the way the title tag is rendered?

Jul 17, 2012 at 6:56 PM

Thanks for helping out and giving me a good direction to find a solution.  Just for purposes of helping anyone else out who may encounter this problem, I originally "hid" the Title from the content of the page but still used it for the Browser Title of a page. This worked fine up to Orchard 1.3 using the following in Placement:

<Place Parts_Title="-"/>

 With the change to 1.4 and the change from Route part to Title part, that no longer worked.  So I deleted that.

But, I had to also modify/create (depending on whether you already had such a file) the Parts.Title.cshtml in my /Views/ folder. Particularly, I had to comment out the following:


    Layout.Title = Model.Title;

@*<h1>@Model.Title</h1>*@ <!--Commented out so as to NOT appear on the actual page-->

But I left in the code at the top.  Now my page "Title" that I insert in the backend appears as a Title in the Browser window (or tab), which is SEO friendly, but NOT in the actual page.

I hope this helps someone.