Ecommerce Templates > Search engine friendly > Dynamic title and meta description tags - ASP Version

Dynamic title and meta description tags - ASP Version

search engine friendly

It is possible to dynamically generate the title and meta description tags for your categories, product and product detail pages. Not only are they dynamically generated but you can also add you own unique information such as company name to the title tag. In version 6.4 you can also set the title and meta description tag through the product and category admin pages on a product by product basis. The set up details are outlined below:

The pages you are going to want to change are categories.asp, products.asp and proddetail.asp

Open each of these in turn and go to HTML view. About halfway down the page you should see a bunch of "include" files, something like this...

<!--#include file="vsadmin/db_conn_open.asp"-->
<!--#include file="vsadmin/inc/languagefile.asp"-->
<!--#include file="vsadmin/includes.asp"-->
<!--#include file="vsadmin/inc/incfunctions.asp"-->
<!--#include file="vsadmin/inc/incproducts.asp"-->

You will want to delete the first one, the db_conn_open.asp line.

Then, at the very top of the file before the first <html> tag add that db_conn_open line along with the metainfo.asp include line like this...

<!--#include file="vsadmin/db_conn_open.asp"-->
<!--#include file="vsadmin/inc/metainfo.asp"-->
<html>

Now repeat this with each of the 3 files categories.asp, products.asp and proddetail.asp

categories.asp title tag

If you want to use the title you have added in the category admin page

Category page title

...use the following for the title on categories.asp

<title>Bob's widget store: <%= pagetitle%></title>

If you are not using the Page Title Tag feature you may want to use the following instead which will show the category name in the title

<title>Bob's widget store: <%
if topsection<>"" then response.write topsection & ", "
response.write sectionname%></title>

categories.asp meta description tag

Below the title add the following....

<meta name="Description" content="<%=Replace(sectiondescription,"""","&quot;")%>">

If you are using the meta description feature in the admin category page

Meta description

That is what will appear on categories.asp. If you are not using that feature, the section description will be used instead.

products.asp title tag

If you want to use the title you have added in the category admin page

Category page title

...use the following for the title on products.asp

<title>Bob's widget store: <%= pagetitle%></title>

If you are not using the Page Title Tag feature you may want to use the following instead which will show the category name in the title

<title>Bob's widget store: <%
if topsection<>"" then response.write topsection & ", "
response.write sectionname%></title>

products.asp meta description tag

Below the title add the following....

<meta name="Description" content="<%=Replace(sectiondescription,"""","&quot;")%>">

If you are using the meta description feature in the admin category page

Meta description

That is what will appear on products.asp. If you are not using that feature, the section description will be used instead.

proddetail.asp title tag

If you want to use the title you have added in the product admin page...

Category page title

...use the following for the title on proddetail.asp

<title>Bob's widget store: <%= pagetitle%></title>

If you are not using the Page Title Tag feature you may want to use the following instead which will show the product name, category name and product id in the title

<title>Bob's widget store: <%= productname & ", " & sectionname & ", " & productid %></title>

You might not want to include the product ID, in which case you can use...

<title>Bob's widget store: <%= productname & ", " & sectionname %></title>

proddetail.asp meta description tag

Below the title add the following....

<meta name="Description" content="<%=Replace(productdescription,"""","&quot;")%>">

If you are using the meta description feature in the product admin page

Meta description

That is what will appear on proddetail.asp. If you are not using that feature, the product description will be used instead.

Note If you are using the category identifier feature or extensionless URLs you will also need to place the includes.asp line at the top of the code like this

<!--#include file="vsadmin/db_conn_open.asp"-->
<!--#include file="vsadmin/includes.asp"-->
<!--#include file="vsadmin/inc/metainfo.asp"-->

Multiple language set up
If you are using the multiple language set up then you will need these include lines before the <html> tag:

<!--#include file="vsadmin/db_conn_open.asp"-->
<!--#include file="vsadmin/inc/languagefile.asp"-->
<!--#include file="vsadmin/includes.asp"-->
<!--#include file="vsadmin/inc/incfunctions.asp"-->
<!--#include file="vsadmin/inc/metainfo.asp"-->

...making sure they are not duplicated later in the code.

Top of page

More search engine friendly features from Ecommerce Templates

Top of page