Jump to content
Sign in to follow this  
vchris

Get page name

Recommended Posts

How can I get the name of the page I am browsing? If I am on a page called page_e.cfm, I want the link to be page_f.cfm so basically change _e for _f.

Share this post


Link to post
Share on other sites

this code outputs the current url

<cfoutput>	  http://#cgi.server_name##cgi.script_name#?#cgi.query_string#</cfoutput>

so I guess what you are looking for is #cgi.script_name#

Share this post


Link to post
Share on other sites

when in doubt, use this to investigate exactly what you need.<cfdump var"#cgi#" label="Use at will CGI variables!">I put this and even a session dump in my "onrequestend.cfm" file. I keep it there commented out so I can easily get the information whenever i want. Not sure if you know that, but the "onrequestend.cfm" file works just like the "application.cfm" file except that it gets run at the end of every file. Its helpful in a number of situations.

Share this post


Link to post
Share on other sites

this code will help u just check it out<cfparam name="URL.startrow" default="1" /><cfset nNextRows = URL.startrow + 2 /><cfset nPreviousRows = URL.startrow - 2 /><head><title>Pageable Record</title></head><table><cfoutput><tr> <cfif nNextRows LTE 10> <td><a href="#CGI.SCRIPT_NAME#?startrow=#nNextRows#">Next Record</a></td> </cfif> <cfif nPreviousRows GTE 1> <td><a href="#CGI.SCRIPT_NAME#?startrow=#nPreviousRows#">Previous Record</a></td> </cfif></tr></cfoutput><cfoutput query="pageable" startrow="#url.startrow#" maxrows="2"><tr> <td>#per_name#</td> <td>#per_phone#</td></tr></table></cfoutput><body></body></html>

Share this post


Link to post
Share on other sites

This was in Feb this year... I figured it out!

Share this post


Link to post
Share on other sites
This was in Feb this year... I figured it out!
took you that long - wow, what do you get per hour?:)

Share this post


Link to post
Share on other sites

I get way too much :)Don't play with me! I've killed for a lot less :)

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

×
×
  • Create New...