SobekCM.Library.HTML.Item_HtmlSubwriter.Write_Within_HTML_Head C# (CSharp) Method

Write_Within_HTML_Head() public method

Write any additional values within the HTML Head of the final served page
public Write_Within_HTML_Head ( TextWriter Output, Custom_Tracer Tracer ) : void
Output System.IO.TextWriter Output stream currently within the HTML head tags
Tracer SobekCM.Tools.Custom_Tracer Trace object keeps a list of each method executed and important milestones in rendering
return void
        public override void Write_Within_HTML_Head(TextWriter Output, Custom_Tracer Tracer)
        {
            // ROBOTS SHOULD BE SENT TO THE CMS PAGE FOR THIS
            Output.WriteLine("  <meta name=\"robots\" content=\"noindex, nofollow\" />");

            // Write the main SobekCM item style sheet to use
            Output.WriteLine("  <link href=\"" + Static_Resources_Gateway.Sobekcm_Item_Css + "\" rel=\"stylesheet\" type=\"text/css\" />");

            // Add any viewer specific tags that need to reside within the HTML head
            if (pageViewer != null)
                pageViewer.Write_Within_HTML_Head(Output, Tracer);

            // Add a thumbnail to this item
            if ((currentItem != null) && ( !String.IsNullOrEmpty(currentItem.Behaviors.Main_Thumbnail)))
            {
                string image_src = currentItem.Web.Source_URL + "/" + currentItem.Behaviors.Main_Thumbnail;

                Output.WriteLine("  <link rel=\"image_src\" href=\"" + image_src.Replace("\\", "/").Replace("//", "/").Replace("http:/", "http://") + "\" />");
            }
        }