Knowledgebase

Home » Item #914

How do I set page title and description and keyword metatags on my pages?

Item: #914
Date: 2 Jul 2004
Applies to
v6

Question

I see that on the product.asp and prodtype.asp pages, the meta tags for description and keywords are automatically populated. However, on some other pages, they are blank. How do I go about populating them?

Answer

In v6 pro, you can use custom attributes to set the page title, meta description and meta keywords for product pages.

Go to your back end and then go to 'Products > Product Attributes'.

Create a new attribute called 'Page Title'. Set it to be text, uncheck 'show on product page', don't include it on the search or comparison, and select 'Page Title' from the special use dropdown. When you create or edit products, you will then be able to specify the Page Title separately from the name of the product. Repeat for the meta description and keywords.


Setting the default values that will be used on other pages can be done in both v6 pro and v6 standard as follows. If no other ones are specified, open up your config.asp and add these lines (at top or bottom):

strPageTitleHTML = "your new page title"
strMetaDescHTML = "your new meta description"
strMetaKeywordsHTML = "your new meta keywords"

If you want to overrule these on particular pages, then you can add these lines to any script after the config.asp include reference and before the buildpage.asp include reference, for example:
<!--#include file="includes/config.asp"-->
<!--#include file="includes/lockshop.asp"-->
<!--#include file="includes/checkpicdims.asp"-->
<!--#include file="includes/initialize.asp"-->
<!--#include file="includes/functions.asp"-->
<%
strPageTitleHTML = "your new page title"
strMetaDescHTML = "your new meta description"
strMetaKeywordsHTML = "your new meta keywords"
%>
<!--#include file="includes/buildpage.asp"-->

Can't find the answer you need? Click here to open a support ticket.

« Back