Help needed with duplicate title tags
Posted: Thu Oct 15, 2009 8:14 am
Hello, my customer is using AC 7.0. We are experiencing a problem with poor search results due to an issue with title tags being duplicated. In the code below you can see three different title tags being generated. I've seperated them by spaces so you can scroll to them easily. I think I have found where some of the code for the 1st and 3rd title yags are coming from but don't know where the 2nd tag is being generated or why all three are appearing at once. Any suhhestions on this?
I think I know where the tags for the 1st and 3rd tags are coming from but not the 2nd.
The 1st tage is being generated by a method in the PageHelper.cs file. From what I can tell this is the correct method we want to keep. Or at least it is putting the correct tags at the top of the page.
The 3rd tag I believe is coming from the ASPX page or Products.aspx as seen below
This happens for most of the pages. If there are not three tags it's the 3rd tag that is being omitted. All pages are getting at least two title tags place on them.
Thank you in advance for any help.
Code: Select all
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head id="ctl00_head1">
<title>Bald Cypress Grove</title> //FIRST TITLE TAG
<meta name='keywords' value='Bald Cypress Grove Bonsai, indoor bonsai tree, bonsai, bonzai, tropical tree, succulant'><meta name='description' value=''>
<script language="javascript">
//Additional Javascript
</script>
<link href="App_Themes/BonsaiOutlet/ComponentArt_menuStyle.css" type="text/css" rel="stylesheet" /><link href="App_Themes/BonsaiOutlet/ComponentArt_tabStyle.css" type="text/css" rel="stylesheet" /><link href="App_Themes/BonsaiOutlet/ComponentArt_treeStyle.css" type="text/css" rel="stylesheet" /><link href="App_Themes/BonsaiOutlet/print.css" type="text/css" rel="stylesheet" /><link href="App_Themes/BonsaiOutlet/style.css" type="text/css" rel="stylesheet" /><link href="App_Themes/BonsaiOutlet/webparts.css" type="text/css" rel="stylesheet" />
<title>Bonsai Tools | Bonsai Trees | Bonsai Supplies</title><meta name='keywords' value='Bonsai, Bonzai, Japanese Bonsai Tools, Trees, Plant'><meta name='description' value='BonsaiOutlet.com is the internets leading supplier of Bonsai Tools, Trees, and Supplies.'> //SECOND TITLE TAG
<title>View Product</title> //THIRD TITLE TAG
<style type="text/css">
.ctl00_ContentZone_0 { border-color:Black;border-width:1px;border-style:Solid; }
</style></head>
The 1st tage is being generated by a method in the PageHelper.cs file. From what I can tell this is the correct method we want to keep. Or at least it is putting the correct tags at the top of the page.
Code: Select all
public class PageHelper
{
public static void RegisterBasketControl(Page page)
{
...
public static void BindMetaTags(Page page, ICatalogable catalogObject)
{
if (catalogObject != null)
{
page.Header.Controls.AddAt(0,new LiteralControl(catalogObject.HtmlHead));
}
}
...
}
}
Code: Select all
<%@ Page Language="C#" MasterPageFile="~/Layouts/Scriptlet.master" Inherits="CommerceBuilder.Web.UI.AbleCommercePage" Title="View Product" %>
......
Thank you in advance for any help.