* Graham * Waplocus
This is how it can be done
http://baretest.xtgem.com/ntest
Add <!--*--> to the end of the filelist template (convert to &lt;!--*--&gt; in the template)
The script counts the number of <!--*--> tags and splits the filelist after the 5th tag
<!--parser:xtscript-->
var $list=<xt:filelist folder="/images" template="&lt;a href=&quot;.file_url.?__xt_download=1&quot;&gt;.file_name_base_parsed.&lt;/a&gt;&lt;br /&gt;&lt;!--*--&gt;" per_page="10">
var $count=1
var $pos=0
@loop
var $pos=call strpos $haystack=$list; $needle=<!--*-->; $offset=($pos+1);
if $count<5
var $count=($count+1)
goto @loop
endif
var $l1=call substr $val=$list; $start=0 ; $length=$pos
var $l2=call substr $val=$list; $start=$pos
<!--/parser:xtscript-->
<div>{_$$l1|}<xt:include file="/file" />{_$$l2|}</div>

Copy code
2016-12-04 08:46 (edited 2016-12-04 09:30 by Graham ) · (0)

Online: Guests: 1