bxrunner
asked on
Last Modified
Am using coldfusion MX and am very new at it. Am creating a web page and the user insists on a last date modified on the first page. I have gone through every book imaginable to no avail. Can some one please give me the step by step instructions.
Thank you
Thank you
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
That wil work but it is more overhead. Use the filter value in cfdirectory to get just that file name.
<cfdirectory action="list" directory="#GetDirectoryFr omPath(Get CurrentTem platePath( ))#" name="myDir" filter="#getfilefrompath(G etCurrentT emplatePat h())#">
then just output
<cfoutput>#myDir.name#-#my Dir.DATELA STMODIFIED #</cfoutpu t>
This should just return one result which will allow you to get past having to loop through the entire directory.
for more info on <cfdirectory>:
http://livedocs.macromedia.com/coldfusion/6.1/htmldocs/tags-a20.htm
<cfdirectory action="list" directory="#GetDirectoryFr
then just output
<cfoutput>#myDir.name#-#my
This should just return one result which will allow you to get past having to loop through the entire directory.
for more info on <cfdirectory>:
http://livedocs.macromedia.com/coldfusion/6.1/htmldocs/tags-a20.htm
First we qury the directory to get a list of all the files in that directory
<cfdirectory action="list" directory="#GetDirectoryFr
second we get the name of the current file
<cfset thisFile=#listlast(GetBase
<cfoutput>
thrid we loop through the list of files to see if any of match the current page
<cfloop query="myDir">
<cfif thisfile is name>
#name#-#DATELASTMODIFIED#
</cfif>
</cfloop>
</cfoutput>