Print Page | Close Window

Change the page title of Contact Us

Printed From: ProductCart E-Commerce Solutions
Category: ProductCart
Forum Name: Using ProductCart
Forum Description: Running your store with ProductCart
URL: https://forum.productcart.com/forum_posts.asp?TID=2514
Printed Date: 27-February-2025 at 5:04am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Change the page title of Contact Us
Posted By: ledfish
Subject: Change the page title of Contact Us
Date Posted: 26-February-2009 at 6:15pm

on the out of the box "contact Us" form, mine show in IE with a title of "Productcart shopping cart software - Companyname - .....etc"

What do I need to do to have it read "Contact Us - Compnayname"
 
I thought I need to just go into the file and adjust the <Title> tag, but I can't seem to find one.
 



Replies:
Posted By: Greg Dinger
Date Posted: 26-February-2009 at 6:36pm
You need to update your default title and meta tag entries:
http://wiki.earlyimpact.com/productcart/seo-meta-tags - http://wiki.earlyimpact.com/productcart/seo-meta-tags


-------------
GreyBeard Design Group

Certified ProductCart Developer

Web Design/Development/Hosting

http://tinyurl.com/5c8t4t" rel="nofollow - Add-Ons & Custom Code |


Posted By: ledfish
Date Posted: 26-February-2009 at 6:49pm

ok, updating the defaults in include-metatags.asp will take care of any page without a title, but I do not see where that will get the "contact.asp" to show up with a title of  "contact us"

Changing the defaults in include-metatags.asp just makes any page without a title show up with the default page name. Just to clarify, I don't want my default page name to be "contact us"


Posted By: Greg Dinger
Date Posted: 26-February-2009 at 7:06pm
OK, now that you have that done, you can move on to the next bit.  And the answer is, you cannot do this without custom code.
 
As you see, the header.asp file contains a reference to the include-metatags.asp script, followed by this logic:
if pcv_PageName<>"" then%>
<title><%=pcv_PageName%></title>
<%end if%>
<%GenerateMetaTags()%>
 
If you really want to do this, what you will have to do is to retrieve the current page name using something such as "Request.ServerVariables("SCRIPT_NAME")", then test the page name for contact.asp, and take action accordingly (such as hard-coding your preferred title tag within some IF logic.
 
This article will give you some ideas about getting the page name:
http://classicasp.aspfaq.com/files/directories-fso/how-do-i-get-the-name-of-the-current-url/page.html - http://classicasp.aspfaq.com/files/directories-fso/how-do-i-get-the-name-of-the-current-url/page.html


-------------
GreyBeard Design Group

Certified ProductCart Developer

Web Design/Development/Hosting

http://tinyurl.com/5c8t4t" rel="nofollow - Add-Ons & Custom Code |


Posted By: ledfish
Date Posted: 26-February-2009 at 8:03pm

ok, that's not the answer I hoping for, but it is what it is.

Thanks
 


Posted By: Greg Dinger
Date Posted: 26-February-2009 at 8:09pm
The dilemna is that (a) header.asp is used on all pages and that (b) GenerateMetaTags contains logic to render the appropriate meta tags for any standard page in the site and (c) contact.asp is one of a few pages which display the default values.  Given that you want to change the behavior so that contact.asp gets different treatment than other pages, that logic has to be created.
 
Contact anyone on the PC developer list if you wish the code built for you.


-------------
GreyBeard Design Group

Certified ProductCart Developer

Web Design/Development/Hosting

http://tinyurl.com/5c8t4t" rel="nofollow - Add-Ons & Custom Code |


Posted By: ledfish
Date Posted: 26-February-2009 at 9:29pm
Greg
 
Thank you........I got it all squared away now.



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net