* Graham * kapilover08 I am working on a script using the second option (javascript array created by xtscript and xt:filelist)
The filelists are not in the xtscript so no timeouts for big folders
but you have to be careful as js uses device memory
No pagination yet or other fancy bits and this is just a first demo of the principle NOT a usable script
# Search form
get search
print {{<div>
<form action="<xt:url>" >
<input type="search" name="search" value="$search" />
<input type="hidden" name="s" value="1" />
<input type="submit" value="go" />

# Array template
  var $template=template="['.file_name_parsed.','.file_url.','.file_size.','.file_datetime.','.file_mime.']," filter="$search*" per_page="0"

<script type="text/javascript">
if ({_$s|}==1 ){
  var list=[<xt:filelist folder="/YOUR_FOLDER" {_$$template|}/><xt:filelist folder="/YOUR_OTHER_FOLDER" {_$$template|}/>['dummy']];
for(i=0;i < list.length;i++){
  document.write('<a href="'+list[i][1]+'?__xt_download=1">'+list[i][0]+'</a><br />');
  document.write('Size <span>'+list[i][2]+'</span><br />');
  document.write('Date <span>'+list[i][3]+'</span><br />');
  document.write('Type <span>'+list[i][4]+'</span>');

Copy code
2015-03-09 00:18 (edited 2015-03-09 00:42 by Graham ) · (0)

Online: Guests: 1