Page 1 of 1

Meta tag display

Posted: Thu Apr 24, 2008 1:40 pm
by jmestep
I've entered in some keywords, titles, etc into the html head field in some categories and they are not being rendered in the page. Is there something else I need to do?
Thanks

Re: Meta tag display

Posted: Thu Apr 24, 2008 3:09 pm
by jmestep
The only code I can find, other than the input code in the admin pages is in the App_Code/ Pagehelper.cs:
public static void BindMetaTags(Page page, ICatalogable catalogObject)
{
if (catalogObject != null)
{
page.Header.Controls.Add(new LiteralControl(catalogObject.HtmlHead));
}
}
In VS2005, the metadata for that code says:
Summary:
// Gets the document header for the page if the head element is defined with
// a runat=server in the page declaration.
//
// Returns:
// An System.Web.UI.HtmlControls.HtmlHead containing the page header.

Does anyone know where that would be so I can check it? I've looked at some of the pages and in the App_Data scriplets.

Re: Meta tag display

Posted: Thu Apr 24, 2008 4:51 pm
by AbleMods
You should only have to populate the HTML Head section like this:

Code: Select all

<meta name="keywords" content="Stansport,48263-01,276-9,Appliances"/>
<meta name="description" content="Stainless Steel 9 Cup Coffee Pot"/>
Make sure you do a search and don't just look for it in the HTML source of the rendered page. Sometimes the tags get pushed far to the right and they're not obvious to see.

Re: Meta tag display

Posted: Thu Apr 24, 2008 8:39 pm
by bobr2k
It was my understanding you could gain as much populating the html head of the categories with something like: meta name="keywords" content="nuts, bolts, hammers,saws"
one forum entry suggested they aren't used anymore ... not sure who to believe anymore. :shock:

Re: Meta tag display

Posted: Thu Apr 24, 2008 8:42 pm
by jmestep
I've checked some other page and it's OK. The one it isn't showing up on is an adaptation of a category page, so I must have broken it.

Re: Meta tag display

Posted: Thu Apr 24, 2008 10:55 pm
by AbleMods
Way to go Judy :wink:

Re: Meta tag display

Posted: Fri Apr 25, 2008 3:41 pm
by jmestep
OK, more info. I didn't break it. The contents of the <head> field put into the admin field don't show up for any of my webpages, just for categories and products. Can anyone else verify?

Re: Meta tag display

Posted: Fri Apr 25, 2008 7:34 pm
by AbleMods
jmestep wrote:...of the <head> field put into the admin field
Where is what you are talking about Judy?

Re: Meta tag display

Posted: Sat Apr 26, 2008 8:23 am
by jmestep
I meant HTML Head field when editing a webpage. I just tried it and now something is showing up. Maybe it was a cache issue.
Sorry for the trouble and thanks for the posts.

Re: Meta tag display

Posted: Sat Apr 26, 2008 8:33 am
by jmestep
I think I've got it figured out. The merchant wanted me to put a special <title> tag in above the keywords and description and when I took that out, the rest showed up.