Jason,
4 things:
1) you need cf5+ for cfdump to work. If you don't have cf5+ look for the
custom tag cf_dump.cfm -- it's WELL worth having.
2) If you create a variable in a custom tag (in this case the "files"
recordset) it is not available outside the custom tag. However, you can
reference the caller scope inside the tag:
<cfdirectory
directory="#getdirectoryfrompath(getcurrenttemplatepath())#"
action="list"
name="caller.files"
filter="*.html"
sort="name">
3) id you want to use this custom tag lots you would probably want to
pass in the folder as an attribute
4) Does it really need to be a custom tag? Maybe it does -- depends what
you're doing.
> -----Original Message-----
> From: Jason Miller [mailto:[EMAIL PROTECTED]]
> Sent: Saturday, 23 November 2002 6:07 p.m.
> To: CF-Talk
> Subject: Re: Compiling List of Files in specific folders
>
>
> Mathew - Didn't want to post onlist I feel for some reason
> this is a bit
> to novice for the list. And for some reason I am just not
> grasping it. I
> hope you don't mind the post offlist - If you do - my sincere
> apologies
> and simply delete.
>
> I had tried what you suggested and searched on MACR a bit on running
> tags in module - I currently have this.
>
> Listing.cfm - with this code -
> <cfmodule template="GetFiles.cfm">
> And in t he same directory... GetFiles.cfm with this code
> <cfdirectory
> directory="#getdirectoryfrompath(getcurrenttemplatepath())#"
> action="list"
> name="files"
> filter="*.html"
> sort="name">
>
> <cfdump var="#files#">
>
>
>
> I also tried moving the dump to the Listings page in output
> tags. Since
> this is new ground for me - I really don't know what structure to
> precisely follow to run the cfdirectory tag.
>
>
>
> I get a message - doesn't understand cfdump. Is it possible that
> cfdirectory is disabled? Or did I make a mess of your post with the
> above?
>
>
>
> Any help is quite appreciated.
>
> Best Regards,
>
> jason Miller
>
>
>
>
> Matthew Walker wrote:
>
>
> created. No database involved. It's also hosted so custom tags are
>
> really a long shot.
>
>
>
>
>
> BTW in case you don't realise, you can call custom tags using
> cfmodule.
>
>
>
> <cfmodule template=".....">
>
>
>
> </cfmodule>
>
>
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription:
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Structure your ColdFusion code with Fusebox. Get the official book at
http://www.fusionauthority.com/bkinfo.cfm