Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

CFDIRECTORY and results paging?

Participant ,
Jul 21, 2008 Jul 21, 2008
I realize this is probably a stupid question, but is there way to use something like recordset paging when displaying the files within a particular folder on a server?

My code:

<cfset DIRECTORY="#ExpandPath("..\docs\#url.dir#\")#">

<cfdirectory action="LIST"
directory="#directory#"
name="files"
sort="name">

From that point, I have the list of files output in the correct directory, based on the URL parameter. I could end up with having 300 plus images in the list that is being displayed as a result of the CFDIRECTORY tag. Is there any way to split up the list? Is there something I could do with the filter option within CFDIRECTORY?

Thanks!
TOPICS
Advanced techniques
525
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

LEGEND , Jul 21, 2008 Jul 21, 2008
ssailer wrote:
> I realize this is probably a stupid question, but is there way to use something
> like recordset paging when displaying the files within a particular folder on a
> server?
>

Well I would say your favorite record set pager would be a logical
choice. The result of a <cfdirectory ...> tag *is* a record set and
behaves just like any other record set be they from <cfquery...>,
<cfstoredprocedure...>, <cfldap...> or any other tag that returns a
record set.
Translate
LEGEND ,
Jul 21, 2008 Jul 21, 2008
ssailer wrote:
> I realize this is probably a stupid question, but is there way to use something
> like recordset paging when displaying the files within a particular folder on a
> server?
>

Well I would say your favorite record set pager would be a logical
choice. The result of a <cfdirectory ...> tag *is* a record set and
behaves just like any other record set be they from <cfquery...>,
<cfstoredprocedure...>, <cfldap...> or any other tag that returns a
record set.
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Jul 21, 2008 Jul 21, 2008
LATEST
yay! it worked! Thank you so much!
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources