![]() |
Change the page title of Contact Us |
Post Reply ![]() |
Author | |
ledfish ![]() Newbie ![]() Joined: 27-October-2005 Location: United States Status: Offline Points: 0 |
![]() ![]() ![]() ![]() ![]() 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.
|
|
![]() |
|
Greg Dinger ![]() Certified ProductCart Developers ![]() ![]() Joined: 23-September-2006 Location: United States Status: Offline Points: 238 |
![]() ![]() ![]() ![]() ![]() |
You need to update your default title and meta tag entries:
|
|
![]() |
|
ledfish ![]() Newbie ![]() Joined: 27-October-2005 Location: United States Status: Offline Points: 0 |
![]() ![]() ![]() ![]() ![]() |
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"
|
|
![]() |
|
Greg Dinger ![]() Certified ProductCart Developers ![]() ![]() Joined: 23-September-2006 Location: United States Status: Offline Points: 238 |
![]() ![]() ![]() ![]() ![]() |
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 |
|
![]() |
|
ledfish ![]() Newbie ![]() Joined: 27-October-2005 Location: United States Status: Offline Points: 0 |
![]() ![]() ![]() ![]() ![]() |
ok, that's not the answer I hoping for, but it is what it is. Thanks
|
|
![]() |
|
Greg Dinger ![]() Certified ProductCart Developers ![]() ![]() Joined: 23-September-2006 Location: United States Status: Offline Points: 238 |
![]() ![]() ![]() ![]() ![]() |
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.
|
|
![]() |
|
ledfish ![]() Newbie ![]() Joined: 27-October-2005 Location: United States Status: Offline Points: 0 |
![]() ![]() ![]() ![]() ![]() |
Greg
Thank you........I got it all squared away now.
|
|
![]() |
Post Reply ![]() |
|
Tweet
|
Forum Jump | Forum Permissions ![]() You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |