Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

page URL

Status
Not open for further replies.

lucidtech

IS-IT--Management
Jan 17, 2005
267
US
is thare a way for Coldfusion to retrive the current URL... like, when I go to my index page, is there a way to output the " infromation onto the page, and do so dynamically?
 
<!--- Grab file content --->
<cfhttp url=" method="GET"
resolveurl="true">
</cfhttp>

<!--- Store the file content into a more intuitive variable name set the file info to pageData --->
<cfset pageData = cfhttp.fileContent>

<!--- Parse data to get absolute image file name, here I am finding the part of the page I want to take, so I take all the information between begin movie coming soon boxarts and end movie coming soon boxarts and set it to comingsoonText, then I write it to a cfm file then I can include it were ever I want. --->

<cfset start = Find("<!-- begin movie coming soon boxarts-->",pageData)>
<cfset start = start + Len("<!-- begin movie coming soon boxarts-->")>

<cfset end = Find("<!-- end movie coming soon boxarts-->",pageData)>
<cfset comingsoonText = Mid(pageData, start, end - start)>

<cfoutput>
<br>
<cffile action="write" output="#comingsoonText#" file="#expandpath("comingsoonText.cfm")#">
</cfoutput>

Works Great

check it out


I pull in all the movie pictures and titles that are coming soon.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top