I am an asp.net developer working on a sitecore based site, our sitecore expert is on holiday at the moment and sitecore seems to be doing something that I don’t understand.
I need to dynamically add meta tags to the page header so I added runat=”server to the head tag as below
<head runat="server">
This works and allows me to do what I need to do, however there is a strange side effect, it adds an empty <title></title> tag to the header and I can’t work out how and why this is happening. We currently have a site wide static title so we end up 2 title tags which is annoying. However we intend to start setting the page title dynamically soon so guess I want to know 2 things?
Why/how is is this happening?
Is it something that can easily be hooked into to set the page title dynamically based on the value of a sitecore field?
From what I know it’s a known asp.net issue (feature?).
You can add a hidden title tag runat server to the head, to avoid creating additional empty title tag, e.g.: