Print Page | Close Window

Custom Titles On Custom .ASP Pages

Printed From: ProductCart E-Commerce Solutions
Category: ProductCart
Forum Name: Customizing ProductCart
Forum Description: Exchange messages with other users that are customizing ProductCart.
URL: https://forum.productcart.com/forum_posts.asp?TID=1918
Printed Date: 23-April-2025 at 11:00am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Custom Titles On Custom .ASP Pages
Posted By: JWL
Subject: Custom Titles On Custom .ASP Pages
Date Posted: 18-August-2008 at 6:14pm
Anyone know an easy way to do this?  I thought, I had it, but this didn't work.  I created another header file, where I removed the Title code, and then I changed the blank .asp template page like this.  See, this would allow you to put individual Title's on each custom .asp page, instead of it pulling in the same default title for every page.  But, it still pulls in the default title anyway... I think maybe because this: <%Session.LCID = 1033
if pcv_PageName<>"" then%> - is still in the code, but if I remove that - the page doesn't load.  Anyone, have any ideas?  Thanks.


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
<!--#include file="include-metatags.asp"-->
<html>
<head>
<%Session.LCID = 1033
if pcv_PageName<>"" then%>
<title>What Are The Best Notebook Computers?</title>
<% response.Buffer=true %>
<!--#include file="../includes/settings.asp"-->
<!--#include file="../includes/storeconstants.asp"-->
<!--#include file="../includes/opendb.asp"-->
<!--#include file="../includes/languages.asp"-->
<!--#include file="../includes/currencyformatinc.asp"-->
<!--#include file="../includes/stringfunctions.asp"-->
<!--#include file="pcStartSession.asp"-->
<!--#include file="header3.asp"-->

    <div id="pcMain">

</div>

<!--#include file="footer.asp"-->


New header


<%end if%>
<%GenerateMetaTags()%>
<%Response.Buffer=True%>
<%
Set conlayout=Server.CreateObject("ADODB.Connection")
conlayout.Open scDSN
Set RSlayout = conlayout.Execute("Select * From layout Where layout.ID=2")
Set rsIconObj = conlayout.Execute("Select * From icons WHERE id=1")
%>
<link type="text/css" rel="stylesheet" href="pcHeaderFooter.css" />
<link type="text/css" rel="stylesheet" href="pcStorefront.css" />


See, I tried to remove the title code from the header, so I could manually put the title on the custom asp page.



Replies:
Posted By: worldofrugs
Date Posted: 19-August-2008 at 4:38pm
This is how I've done it... I combined the header.asp and footer.asp and stripped out the top code...
Implemented the title and meta tags, so it can me manually adjusted...
In general here's the result:
--------------
<% response.Buffer=true %>
<!--#include file="../includes/settings.asp"-->
<!--#include file="../includes/storeconstants.asp"-->
<!--#include file="../includes/emailsettings.asp"-->
<!--#include file="../includes/languages.asp" -->
<!--#include file="../includes/opendb.asp"-->
<!--#INCLUDE file="../includes/stringfunctions.asp"-->
<!--#include file="../includes/currencyformatinc.asp"-->
<!--#include file="../includes/validation.asp" -->
<!--#include file="../includes/SearchConstants.asp"-->
<%
on error resume next
'*******************************
' Page Name
'*******************************
Dim pcStrPageName
pcStrPageName = "ThisPageName.asp"
%>
<!--#include file="pcStartSession.asp"-->
<%
Dim query, conntemp, rs, rstemp
call openDb()
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>Title here</title>
<meta tags and scripts here>
</head>
<body>
In the body I used basically an exact copy of the body of the header.asp file.
etc....
</body>
</html>
-----------------------
Perhaps I might have been able to clear it up some more, but all works perfectly, so I didn't bother...
As I use DreamWeaver and have multiple custom asp pages, I made a template out of it with editable regions for the body, title and meta tags...




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