Copy link to clipboard
Copied
I am trying to get a sub content to come into my page and I can't figure out where the GetPageInfo.content lives and how to tell the page what content to get. This has been driving me crazy. Can anyone help?
Thanks
Copy link to clipboard
Copied
Hi,
Can you post some details / code. that could help.
-- Prasanth
Copy link to clipboard
Copied
Thanks,
Each of my main nav categories has a java fade except my home page. I want to add it to my home page as well.
Attached is the new.cfm as an example page that has the fade script working.
Attached is the index page that I want to add it to that is not working
Also the application.cfm page, but I can't find a clue in there either.
I added lines 36-41 to the index page but when I run it, the sub content 1 fades into itself instead of the sub content 2 which I want to be the index page.
Unfortunately I don't have a dev server, so I have to work with a copy of the index page as a test.
I can attach the app.cfm page too, but there's no clue in there either.
Thanks so much
Copy link to clipboard
Copied
I can't seem to send the attachments through.
so I copied and pasted the code here: Sorry for the loooooong post
THE NEW.CFM PAGE THAT IS WORKING THE WAY I WANT IT TO
<cftry>
<cfif not isdefined("url.Pops")>
<cfinclude template="#request.site_addressRelative#design/header.cfm">
<cfelse>
<cfoutput><link href="#request.site_addressRelative#design/styles.css" rel="stylesheet" type="text/css"></cfoutput>
</cfif> <cfif LISTFINDNOCASE (session.transitions,request.pagename) or not findnocase("MSIE","#cgi.HTTP_USER_AGENT#")>
<div style="BodyContent">
<p>
<!--- Insert page content here. --->
<cfif isdefined("qGetPageInfo.Content") and qGetPageInfo.Content is not "">
<cfoutput>#qGetPageInfo.Content#</cfoutput>
</cfif>
</p>
</div>
<cfelse>
<cfset session.transitions = session.transitions & ",#request.pagename#">
<style type="text/css">
#mycontent{
width: 570px;
height: 500px;
background-color: white;
color: black;
filter:progid:DXImageTransform.Microsoft.fade(duration=2);
}
#sub1, #sub2{
width: 100%;
height: 100%;
}
</style>
<div id="mycontent" />
<div id="sub1"><img src="images/fade-new.jpg" /></div>
<div id="sub2" style="display: none; background-color: white;">
<cfoutput>#qGetPageInfo.Content#</cfoutput>
</div>
</div>
<script type="text/javascript">
var divbox=document.getElementById("mycontent")
var subdivs=divbox.getElementsByTagName("div")
function resetstate(){
subdivs[0].style.display="block" //show 1st sub content
subdivs[1].style.display="none" //hide 2nd sub content
}
function addtransition(){
resetstate() //reset state of the two divs (in case demo is run more than once)
divbox.filters[0].apply() //capture initial state of DIV (screenshot)
subdivs[0].style.display="none" //hide 1st sub content
subdivs[1].style.display="block" //show 2nd sub content
divbox.filters[0].play() //play transition to reveal second sub content
}
window.setTimeout(addtransition,2000);
</script>
</cfif>
<!--- <cfform>
<input type="button" value="Run Transition" onClick="addtransition()"/>
</cfform> --->
<cfif not isdefined("url.Pops")>
<cfinclude template="#request.site_addressRelative#design/footer.cfm">
</cfif>
<cfcatch type="any">
<cfinclude template="#request.site_addressRelative#error.cfm">
</cfcatch>
</cftry>
THE INDEX PAGE THAT WON'T WORK FOR ME:
<!--- <cftry> --->
<cfif not isdefined("url.Pops")>
<cfinclude template="#request.site_addressRelative#design/header.cfm">
<cfelse>
<cfoutput><link href="#request.site_addressRelative#design/styles.css" rel="stylesheet" type="text/css"></cfoutput>
</cfif>
<div id="mycontent" />
<div id="sub1"><img src="images/fade-new.jpg" /></div>
<div id="sub2" style="display: none; background-color: white;">
<cfoutput>#qGetPageInfo.Content#</cfoutput>
</div>
</div>
<script type="text/javascript">
var divbox=document.getElementById("mycontent")
var subdivs=divbox.getElementsByTagName("div")
function resetstate(){
subdivs[0].style.display="block" //show 1st sub content
subdivs[1].style.display="none" //hide 2nd sub content
}
function addtransition(){
resetstate() //reset state of the two divs (in case demo is run more than once)
divbox.filters[0].apply() //capture initial state of DIV (screenshot)
subdivs[0].style.display="none" //hide 1st sub content
subdivs[1].style.display="block" //show 2nd sub content
divbox.filters[0].play() //play transition to reveal second sub content
}
window.setTimeout(addtransition,2000);
</script>
<div style="BodyContent">
<p>
<script>
var slideShowSpeed = 5000
var crossFadeDuration = 3
var Pic = new Array()
Pic[0] = '1.jpg'
Pic[1] = '2.jpg'
Pic[2] = '3.jpg'
Pic[3] = '4.jpg'
Pic[4] = '5.jpg'
Pic[5] = '6.jpg'
Pic[6] = '7.jpg'
Pic[7] = '8.jpg'
Pic[8] = '9.jpg'
var t
var j = 0
var p = Pic.length
var preLoad = new Array()
for (i = 0; i < p; i++){
preLoad = new Image()
preLoad.src = Pic
}
function runSlideShow(){
if (document.all){
document.images.SlideShow.style.filter="blendTrans(duration=2)"
document.images.SlideShow.style.filter="blendTrans(duration=crossFadeDuration)"
document.images.SlideShow.filters.blendTrans.Apply()
}
document.images.SlideShow.src = preLoad
if (document.all){
document.images.SlideShow.filters.blendTrans.Play()
}
j = j + 1
if (j > (p-1)) j=0
t = setTimeout('runSlideShow()', slideShowSpeed)
}
</script>
<body onLoad="runSlideShow()">
<table width="500" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="58%" height="150" rowspan="3" valign="top" id="VU">
<div align="right"><a href="/bargains.cfm"><img src="/1.jpg" name='SlideShow' width=300 height=392 border="0"></a></div>
<center>
</center>
</td>
<td height=91 valign="middle" id="VU">
<center>
<a href="/bargains.cfm"><img src="images/index-vacationsale.jpg" width="180" height="54" border="0"></a>
</center>
</td>
</tr>
<tr>
<td height=45 valign="top" id="VU">
<div style="font-family:verdana; font-size:14px; height:175px; line-height:100%; padding:5px; overflow:auto; text-align:left; width:218px; wordspacing:0px;">
<p><font color="#666666" size="2" face="Verdana, Arial, Helvetica, sans-serif"><b>The hand hooked
rugs, furniture, and lifestyle of artist
Claire Murray<br>
<br>
<a href="Furniture.cfm"><img src="images/SaleOfWeek2.jpg" width="150" height="68" border="0"></a><br>
</b></font><font color="#666666" size="2" face="Verdana, Arial, Helvetica, sans-serif">
Through her hand hooked rugs and home accessories, Claire Murray invites you to escape to the world of nature. Explore the beauty of Nantucket, Cape Cod and the Islands through Claire's unique vision; a world where sunny coastal images, weathered cottages and cobblestone streets are lined with hydrangea and picket fences.
</font></p>
<p><font color="#666666" size="2" face="Verdana, Arial, Helvetica, sans-serif">Next, travel to a mountain lodge with Claire's new Lodge Collection where the serenity of a mountain lake and the soft rustling of a gentle breeze is heard over the distant voice of loons.</font></p>
<p><font color="#666666" size="2" face="Verdana, Arial, Helvetica, sans-serif">Next, travel to the Chesapeake Bay, feast on Blue Crabs and take in the local flavor with images of Skipjack lighthouse, seashells and starfish illustrated in Claire's unique color palette.
Claire's hand hooked rugs and home accessories portray life by the sea and transform your home into a coastal retreat. All hand made of 100% wool, these area rugs will become family heirlooms for generations to come.
Capturing the fine art of nature is Claire's passion. Her designs depict seaside living, coastal gardens, wildlife and country cottage styles. In the early days she enjoyed teaching friends and customers the art of needlecraft. Today so many of them keep the tradition alive and still get together to hook rugs, cross-stitch and needlepoint pillows with coastal and flower motifs. Some of her stores still offer these classes. For a schedule please contact the West Barnstable store at 1-508-375-0331.
The art of gracious living is the central theme of the Claire Murray lifestyle. Designed to coordinate with her lovely hand hooked rugs; find hand painted dinnerware, chair pads and even washable mats for those locations that need machine washables.
Responding to popular request Claire had brought back her unique quilts and throws. The lovely mermaid motif is now available in Claire's Mermaid Queen quilts in two color ways along with her vintage cottage motif available in yellow and blue. See Claire's all new spa collection . Be sure to sign up for Claire's mailing list to be the first to know when new items become available and also be entered to win one of her beautiful hand hooked rugs.
Then escape to extraordinary places around the world through the beautiful photography of La Vie Claire magazine. La Vie Claire magazine is unlike any other magazine. The fine quality paper and award winning photography makes it a collectable. Back issues can be ordered individually or in sets to complete your collection. La Vie Claire has won two Ozzie Awards for best new magazine and best photography.
Whether decorating your summer home, beach cottage, vacation hideaway or even your year-round home, the Claire Murray lifestyle will surround you with beauty. You can even join our mailing list to learn about specials, promotions and advance information about new products.
</font></p>
</div>
</td>
</tr>
<tr>
<td height=46 valign="top" id="VU">
<center>
<a href="/E-Cards.cfm"><img src="images/aflag-marker2.jpg" width="108" height="61" border="0"></a>
</center>
</td>
</tr>
</table>
<cfif not isdefined("url.Pops")>
<cfinclude template="#request.site_addressRelative#design/footer.cfm">
</cfif>
<!--- Insert page content here. --->
<cfif isdefined("qGetPageInfo.Content") and qGetPageInfo.Content is not "">
<cfoutput>#qGetPageInfo.Content#</cfoutput>
</cfif>
<!--- Insert Included Form if there is one defined on the Pages Table. --->
<cfif isdefined("qGetPageInfo.Included_Form") and qGetPageInfo.Included_Form is not "">
<cfinclude template="Forms/#qGetPageInfo.Included_Form#">
</cfif>
<!--- Include Product Form --->
<cfinclude template="/Forms/ProductInclude.cfm">
<!---
<cfcatch type="any">
<cfinclude template="#request.site_addressRelative#error.cfm">
</cfcatch>
</cftry> --->
THE APPLICATION.CFM PAGE
<!--- Identify the application and set enable client and session managment --->
<cfapplication name="ClaireMurray" clientmanagement="yes" sessionmanagement="yes" setclientcookies="yes">
<cfsilent>
<!--- Set Environment; Dev = 1, Staging = 2, Production = 3 --->
<cfset environment = 3>
<!--- Set Application Variables --->
<cfswitch expression="#environment#">
<cfcase value="3">
<cfset request.app_name = "ClaireMurray">
<cfset request.dsn="ClaireMurrayDNS45">
<cfset request.app_title = "Claire Murray">
<!--- <cfif isdefined("url.c19")>
<cfset request.site_address = "https://www.clairemurray.com/">
<cfelse> --->
<cfset request.site_address = "http://www.clairemurray.com/">
<!--- </cfif> --->
<cfset request.site_addressSecure = "https://www.clairemurray.com/">
<cfset request.site_addressRelativeSecure = "https://www.clairemurray.com/">
<cfset request.site_addressRelative = "/">
<cfset request.site_path = "D:\inetpub\clairemurray\">
<cfset request.secure_address = "#request.site_addressRelative#">
<cfset request.ContactEmail = "webmaster@clairemurray.com">
<cfset request.FromEmail = "webmaster@clairemurray.com">
<cfset request.MailServer = "GWA1.WEBCONTROLCENTER.COM">
<cfset request.MailPass = "bavn40t">
<cfset request.image_path = "#request.site_addressRelative#images/">
<cfset request.FilesRoot = "#request.site_path#images\Files\">
<cfset request.FilesPath = "#request.site_addressRelative#Images/Files/">
<cfset listcount = 10>
<cfset request.ImportFolder = "#request.site_path#ImportFiles\">
<cfset request.AdManagerPath = "">
<cfset ProdCount = 4>
<cfparam name="session.user_id" default="0">
<cferror template="/error.cfm" mailto="webmaster@clairemurray.com" type="exception">
<cferror template="/error.cfm" mailto="webmaster@clairemurray.com" type="validation">
</cfcase>
</cfswitch>
<cfparam name="session.Permissions" default="1"><!--- Not Logged in --->
<!--- Process login and account update/creation --->
<cfinclude template="UserLoginAction.cfm">
<!--- Get all the page info and cache it --->
<!--- <cfif not isdefined("application.qGetPages") or isdefined("url.flush")>
<cfquery name="application.qGetAllPages" datasource="#request.dsn#">
SELECT * from pages
</cfquery>
</cfif> --->
<!--- <cfif not isdefined("session.qGetPages") or isdefined("url.flush")> --->
<cfquery name="session.qGetPages" datasource="#request.dsn#">
SELECT
parent_page_id,
displayInNav,
sort_order,
nav_title,
product_category,
page_id,
IncludeRollover,
file_name,
Header_Image,
nav_Image
from pages
where permissions like '%,#session.Permissions#,%'
</cfquery>
<!--- </cfif> --->
<!--- <cfif not isdefined("session.qGetAllProducts") or isdefined("url.flush")>
<cfquery name="session.qGetAllProducts" datasource="#request.dsn#">
SELECT * from product where active = 1
order by seq, product_name
</cfquery>
<cfquery name="session.qGetAllSales" datasource="#request.dsn#">
select * from Product_sales
where active = 1
and start_date <= #createodbcdate(now())#
and end_date >= #createodbcdate(now())#
</cfquery>
</cfif> --->
<!--- <cfif not isdefined("application.qGetAllSales") or isdefined("url.flush")>
<cfquery name="application.qGetAllSales" datasource="#request.dsn#">
select * from Product_sales
where active = 1
and start_date <= #createodbcdate(now())#
and end_date >= #createodbcdate(now())#
</cfquery>
</cfif> --->
<cfif isdefined("url.dpid")><!--- Get the product Meta Keywords --->
<cfquery name="qGetProdKeywords" datasource="#request.dsn#">
SELECT keywords from product where product_id = #url.dpid#
</cfquery>
</cfif>
<!--- Grab the physical page name. --->
<cfset request.pagename1 = #right(cgi.SCRIPT_NAME,find("/",reverse(cgi.SCRIPT_NAME))-1)#>
<cfif isdefined("url.alt")>
<cfset request.pagename = "#request.pagename1#?alt=#url.alt#"><!--- This is to handle showing the same page under multiple parents. that page still usses the same filename.--->
<cfelse>
<cfset request.pagename = "#request.pagename1#">
</cfif>
<cfquery name="qGetPageInfo" datasource="#request.dsn#">
SELECT *
from pages
WHERE upper(File_Name) = '#ucase(request.pagename)#'
and permissions like '%,#session.Permissions#,%'
</cfquery>
<cfif #qGetPageInfo.recordcount# gt 0>
<cfset url.page_id = #qGetPageInfo.page_id#>
<cfelse>
<cfset url.page_id = 0>
</cfif>
<!--- JM 090214 added to catch permissions and hacking. this was here previously but looks liek it was removed.--->
<cfif url.page_id is 0>
<cflocation url="index.cfm?err=You have tried to access a page that does not exist or that you do not have permissions to view. Please try again.">
</cfif>
<!--- Call the Custom Tag to build the left nav --->
<cfmodule template="logic/buildnav.cfm" NavLocation="Side" Page_id="#url.page_id#">
<!--- Setup an error mesage handler --->
<cfif isdefined("url.err")>
<cfset errormessage = #url.err#>
<cfelseif isdefined("url.errmsg")>
<cfset errormessage = #url.errmsg#>
</cfif>
</cfsilent>
<cfsilent>
<cfinclude template="/logic/UserDefinedFunctions.cfm">
<cfif session.user_id is ""><cfset session.user_id = 0></cfif>
<!--- Create a unique indentifier for the shopping cart and get the --->
<cfif not isdefined("session.CartSessionID") or #session.CartSessionID# is 0>
<cfquery datasource="#request.dsn#" name="qGetNewShoppingcartID">
SET NOCOUNT ON
insert into CartSessionID (askdate) values (#createodbcdate(now())#)
SELECT @@Identity AS newId
SET NOCOUNT OFF
</cfquery>
<cfset session.CartSessionID = #qGetNewShoppingcartID.newId#>
</cfif>
<cfquery name="qCheckCart" datasource="#request.dsn#">
select count(cart_id) as CheckCartCount
from shoppingcart
where CartSessionID = #session.cartsessionid#
and processed = 0
and expired = 0
</cfquery>
<!--- Create Country list --->
<!--- <cfset request.CountryList = "United States,United Kingdom,Canada,Bermuda,Virgin Islands,Australia,New Zealand,Italy,Spain,France"> --->
<cfparam name="session.transitions" default="">
<cfparam name="session.MyRegistry" default="0">
<cfif isdefined("url.mrid")><cfset session.MyRegistry = #url.mrid#></cfif>
</cfsilent>
<!--- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> --->
<!--- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
---><html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>
<cfoutput>
<cfif isdefined("qGetPageinfo.Browser_Title")>
Claire Murray Official| #qGetPageinfo.Browser_Title#
<cfelse>
Claire Murray Official Site | Hand Hooked Rugs, Area Rugs, Home Accessories for Seaside Living and Coastal Lifestyles.
</cfif>
</cfoutput>
</title>
<cfoutput>
<meta http-equiv="Content-Type" content="text/html;" />
<cfif isdefined("qGetPageInfo.Meta_Desc") and #qGetPageInfo.Meta_Desc# is not "">
<meta name="Description" content="#qGetPageInfo.Meta_Desc#" />
<cfelse>
<meta name="Description" content="Claire Murray" />
</cfif>
<cfif isdefined("qGetProdKeywords.keywords") and qGetProdKeywords.keywords is not "">
<meta name="Keywords" content="#qGetProdKeywords.keywords#" />
<cfelseif isdefined("qGetPageInfo.Meta_Keywords") and #qGetPageInfo.Meta_Keywords# is not "">
<meta name="Keywords" content="#qGetPageInfo.Meta_Keywords#" />
<cfelse>
<meta name="Keywords" content="Claire Murray" />
</cfif>
<!--session id = #session.Permissions#<br>
get pages recordcount = #qGetPageInfo.recordcount#
-->
<link href="#request.site_addressRelative#design/styles.css" rel="stylesheet" type="text/css" />
<cfif not findnocase("MSIE",cgi.HTTP_USER_AGENT) or not findnocase("Windows",cgi.HTTP_USER_AGENT)>
<link href="#request.site_addressRelative#design/stylesFF.css" rel="stylesheet" type="text/css" />
</cfif>
</cfoutput>
<script language="JavaScript">
<!--
function NewWindow(mypage, myname, w, h, scroll) {
var winl = (screen.width - w) / 2;
var wint = (screen.height - h) / 2;
winprops = 'height='+h+',width='+w+',top='+wint+',left='+winl+',scrollbars='+scroll+',resizable'
win = window.open(mypage, myname, winprops)
if (parseInt(navigator.appVersion) >= 4) { win.window.focus(); }
}
function popitup(url) {
newwindow=window.open(url,'name','height=500,width=600');
if (window.focus) {newwindow.focus()}
return false;
}
function MM_openBrWindow(theURL) {
newwindow=window.open(theURL,'name','height=600,width=800');
if (window.focus) {newwindow.focus()}
return false;
}
function changeColor(id, color) {
try
{
document.getElementById(id).style.color= color;
}
catch(err)
{
}
}
function confirmDelete()
{
var agree=confirm("Are you sure you want to delete?");
if (agree)
return true ;
else
return false ;
}
function FilterFiles()
{
document.FilterProductForm.submit();
}
// -->
</script>
<script type="text/javascript" src="blendimages.js"></script>
<!--- <meta name="verify-v1" content="Cl5Xp7y5wiTru6MqbS4wSVL49M6gYBqeD0mm/gXTjo4=" /> --->
Copy link to clipboard
Copied
Hi,
I just went through the code and it seems the issue is with the following code in application.cfm page.
<!--- Grab the physical page name. --->
<cfset request.pagename1 = #right(cgi.SCRIPT_NAME,find("/",reverse(cgi.SCRIPT_NAME))-1)#><cfif isdefined("url.alt")>
<cfset request.pagename = "#request.pagename1#?alt=#url.alt#"><!--- This is to handle showing the same page under multiple parents. that page still usses the same filename.--->
the variable request.pagename is required in the code below. It seems that the above two variables are not getting correctly set as required. Please try to figure out which all parameters are required and check the DB. There might not be a value for the corresponding index.cfm page in DB.
-- Prasanth
Copy link to clipboard
Copied
Copy link to clipboard
Copied
Perhaps the qGetPageInfo object is created in the include <cfinclude template="#request.site_addressRelative#design/header.cfm"> or by your Application.cfm or Application.cfc.
Copy link to clipboard
Copied
Copy link to clipboard
Copied
are you trying to reply ? I can't see anything.
-- Prasanth