Page 1 of 1

Help needed with duplicate title tags

Posted: Thu Oct 15, 2009 8:14 am
by cashr23523
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?

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>
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.

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));
              }
        }
        ...
   }
}

The 3rd tag I believe is coming from the ASPX page or Products.aspx as seen below

Code: Select all


<%@ Page Language="C#" MasterPageFile="~/Layouts/Scriptlet.master" Inherits="CommerceBuilder.Web.UI.AbleCommercePage" Title="View Product" %>
......
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.

Re: Help needed with duplicate title tags

Posted: Thu Oct 15, 2009 9:19 am
by mazhar
Make sure that you didn't tried to set Title tag in HTML Head section on product details page.

Re: Help needed with duplicate title tags

Posted: Thu Nov 19, 2009 4:13 pm
by Ben
question what if the HTML Head is where we want them but not anywhere else? I tried removing them from the pagehelper section but just wind up with an empty title tag open and closed beneth the metatag description.

Re: Help needed with duplicate title tags

Posted: Fri Nov 20, 2009 4:54 am
by mazhar
You can not provide title tag in HTML Head because ASP.NET creates one title tag itself. So you can't control ASP.NET added tittle tag that's why you shouldn't put your custom one in head section. If you want this title tag to be adjusted on some different text value then control it like

Code: Select all

Page.Title = "Your custom title";

Re: Help needed with duplicate title tags

Posted: Thu Aug 05, 2010 2:53 pm
by DBounlom
Hi Mazhar,
You can not provide title tag in HTML Head because ASP.NET creates one title tag itself.
However, in this wiki article about adding meta tags, http://wiki.ablecommerce.com/index.php/ ... ta_tags%3F the added code allows for title tags to be put in the HTML Head section for product pages. Now, you are saying that we should not do that. Is there an easy way to customize the title tag for each product and category page?

I have looked through all of the past posts regarding title and meta tags such as this one viewtopic.php?f=42&t=7875, and they do not seem to help. Even if I did not include a customized title tag in the HTML Head, it appears the meta information is above the auto-generated title tag. Is there some way to fix that?

Thanks!

Re: Help needed with duplicate title tags

Posted: Fri Aug 06, 2010 7:16 am
by jmestep
You can put the title into the meta head section if you put code in the scriplet.master file to move things around as the page is rendered in the browser. You can't do it without doing that because of the way .net renders the default title tag.
We2Market SEO Manager does that.

Re: Help needed with duplicate title tags

Posted: Fri Aug 06, 2010 2:57 pm
by DBounlom
Hi Judy,

I called W2M yesterday because I wanted to inquire about the SEO Manager plugin that you have. Nobody called me back. =(

Re: Help needed with duplicate title tags

Posted: Mon Aug 09, 2010 9:32 am
by jmestep
Please try again and ask for Ruthann, x 205. Or you can place an order.
http://www.web2market.com/SEO-Manager-P122C77.aspx