Re: Nested ListFiles
This WebDNA talk-list message is from 1998
It keeps the original formatting.
numero = 19438
interpreted = N
texte = >How can nest 3 levels of [listfiles] within a single page?Yes, but you should probably try a different technique called recursion.Basically you use an [include] file that [include]s itself whenever it runsinto a folder. You pass the foldername as a parameter to the [include],and at each level of depth the foldername you pass in gets longer andlonger.I don't have time to test one right now, but the idea is like this:-- DisplayFolders.inc --[listfiles [startfolder]] [ShowIf [isFolder]=T] [include file=DisplayFolders.inc&startfolder=[startfolder]/[filename]] [/ShowIf][/listfiles]Notice how the interior loop uses [include] to do it all over again, butwith a built-up path that leads one deeper in the hierarchy.Technical Support | ==== eCommerce and Beyond ====Pacific Coast Software | WebCatalog, WebMerchant,11770 Bernardo Plaza Court | SiteEdit Pro, PhotoMaster,San Diego, CA 92128 | Typhoon619/675-1106 Fax: 619/675-0372 | http://www.smithmicro.com/
Associated Messages, from the most recent to the oldest:
|
- Nested ListFiles (Pat McCormick 1998)
- Re: Nested ListFiles (PCS Technical Support 1998)
|
>How can nest 3 levels of
[listfiles] within a single page?Yes, but you should probably try a different technique called recursion.Basically you use an
[include] file that
[include]s itself whenever it runsinto a folder. You pass the foldername as a parameter to the
[include],and at each level of depth the foldername you pass in gets longer andlonger.I don't have time to test one right now, but the idea is like this:-- DisplayFolders.inc --[listfiles [startfolder]] [ShowIf [isFolder]=T] [include file=DisplayFolders.inc&startfolder=[startfolder]/[filename]] [/ShowIf][/listfiles]Notice how the interior loop uses
[include] to do it all over again, butwith a built-up path that leads one deeper in the hierarchy.Technical Support | ==== eCommerce and Beyond ====Pacific Coast Software | WebCatalog, WebMerchant,11770 Bernardo Plaza Court | SiteEdit Pro, PhotoMaster,San Diego, CA 92128 | Typhoon619/675-1106 Fax: 619/675-0372 | http://www.smithmicro.com/
PCS Technical Support
DOWNLOAD WEBDNA NOW!
Top Articles:
Talk List
The WebDNA community talk-list is the best place to get some help: several hundred extremely proficient programmers with an excellent knowledge of WebDNA and an excellent spirit will deliver all the tips and tricks you can imagine...
Related Readings:
[WebDNA] lookup in tables defined in functions - =?UTF-8?Q?bug=3F?= (2016)
One other big addition... (1997)
Dealing with da back button (1999)
WebCat2 - [format thousands] (1997)
Exclamation point (1997)
RE: Clearing orders and database help! (1997)
WebCatalog Plug-in for Webstar. (1997)
WebCatalog can't find database (1997)
Newbie Question about seeting price to 0 (1998)
Why is this not false? (2001)
Running 2 two WebCatalog.acgi's (1996)
Secure Server (1997)
WebCat & Liststar (1997)
Date problems (1997)
Null Chars (1999)
WebCat2b13MacPlugIn - More limits on [include] (1997)
Do triggers work on Macs? (2000)
[OT] Simple java help please (2004)
To Use Cookies or Not To Use Cookies (2003)
Emailer (1997)