I use "File List Recursive" only in the folders with this java script:
<script type="text/javascript" language="javascript">document.write("%folder%" != "/" ? "<a href=\"~files.lst?recursive\" target=\"_blank\"><font color=blue>*File list*</font></a>" : "");</script>
And I wanna use "File List" (links of the all files) only for root directory. Can somebody write a sript for this?
you know that this method is far from water proof? If someone writes '?recursive' in the address bar whilst browsing the root, they still get a recursive listing..
anyway.. you just need to
finish your script:
<script type="text/javascript" language="javascript">document.write("%folder%" != "/" ? "<a href=\"~files.lst?recursive\" target=\"_blank\"><font color=blue>*File list*</font></a>" : "<a href=\"~files.lst\" target=\"_blank\"><font color=blue>*File list*</font></a>");</script>
everything behind ? is triggered when the given condition is true and everything behind : is triggered when the given condition is false. IF - THEN - ELSE.