/// <summary> Adds the banner to the response stream from either the html web skin
        /// or from the current item aggreagtion object, depending on flags in the web skin object </summary>
        /// <param name="Output"> Stream to which to write the HTML for the banner </param>
        private void Add_Banner(TextWriter Output)
        {
            Output.WriteLine("<!-- Write the main collection, interface, or institution banner -->");
            if ((htmlSkin != null) && (htmlSkin.Override_Banner))
            {
                Output.WriteLine(htmlSkin.Banner_HTML);
            }
            else
            {
                string url_options = currentMode.URL_Options();
                if (url_options.Length > 0)
                {
                    url_options = "?" + url_options;
                }

                if ((Hierarchy_Object != null) && (Hierarchy_Object.Code != "all"))
                {
                    Output.WriteLine("<a alt=\"" + Hierarchy_Object.ShortName + "\" href=\"" + currentMode.Base_URL + Hierarchy_Object.Code + url_options + "\"><img id=\"mainBanner\" src=\"" + currentMode.Base_URL + Hierarchy_Object.Banner_Image(currentMode.Language, htmlSkin) + "\" alt=\"\" /></a>");
                }
                else
                {
                    if ((Hierarchy_Object != null) && (Hierarchy_Object.Banner_Image(currentMode.Language, htmlSkin).Length > 0))
                    {
                        Output.WriteLine("<a href=\"" + currentMode.Base_URL + url_options + "\"><img id=\"mainBanner\" src=\"" + currentMode.Base_URL + Hierarchy_Object.Banner_Image(currentMode.Language, htmlSkin) + "\" alt=\"\" /></a>");
                    }
                    else
                    {
                        Output.WriteLine("<a href=\"" + currentMode.Base_URL + url_options + "\"><img id=\"mainBanner\" src=\"" + currentMode.Base_URL + "default/images/sobek.jpg\" alt=\"\" /></a>");
                    }
                }
            }
            Output.WriteLine();
        }
Example #2
0
        /// <summary> Writes the HTML generated by this simple text / CMS html subwriter directly to the response stream </summary>
        /// <param name="Output"> Stream to which to write the HTML for this subwriter </param>
        /// <param name="Tracer"> Trace object keeps a list of each method executed and important milestones in rendering </param>
        /// <remarks> This finishes out the page and includes all the static content in this static web content file </remarks>
        public void Write_Final_HTML(TextWriter Output, Custom_Tracer Tracer)
        {
            Tracer.Add_Trace("Web_Content_HtmlSubwriter.Write_Final_HTML", "Rendering HTML");

            // If there is a sitemap, move to the second part of the table
            if (siteMap != null)
            {
                Output.WriteLine("</td>");
                Output.WriteLine("<td valign=\"top\">");
            }

            // Save the current mode and browse
            Display_Mode_Enum thisMode = currentMode.Mode;

            if (thisMode == Display_Mode_Enum.Aggregation_Browse_Info)
            {
            }

            if ((thisStaticBrowseObject.Banner.Length > 0) && (thisStaticBrowseObject.Banner.ToUpper().Trim() != "NONE"))
            {
                if (thisStaticBrowseObject.Banner.ToUpper().Trim() == "DEFAULT")
                {
                    if ((htmlSkin != null) && (htmlSkin.Banner_HTML.Length > 0))
                    {
                        Output.WriteLine(htmlSkin.Banner_HTML);
                    }
                    else
                    {
                        if (Hierarchy_Object != null)
                        {
                            Output.WriteLine("<img id=\"mainBanner\" src=\"" + currentMode.Base_URL + Hierarchy_Object.Banner_Image(currentMode.Language, htmlSkin) + "\" alt=\"MISSING BANNER\" /><br />");
                        }
                    }
                }
                else
                {
                    Output.WriteLine("<img id=\"mainBanner\" src=\"" + thisStaticBrowseObject.Banner.Replace("<%BASEURL%>", currentMode.Base_URL) + "\" alt=\"MISSING BANNER\" /><br />");
                }
            }

            // Add the breadcrumbs
            if (!String.IsNullOrEmpty(breadcrumbs))
            {
                Output.WriteLine("<span class=\"breadcrumbs\">" + breadcrumbs + "</span><br />");
            }

            // Add the secondary HTML ot the home page
            Output.WriteLine("<div class=\"SobekResultsPanel\">");
            Output.WriteLine(thisStaticBrowseObject.Static_Text);
            Output.WriteLine("</div>");
            Output.WriteLine("<br />");
            Output.WriteLine();

            // If there is a sitemap, finish the main table
            if (siteMap != null)
            {
                Output.WriteLine("</td>");
                Output.WriteLine("</tr>");
                Output.WriteLine("</table>");
            }
        }