* Graham * Waplocus You cannot do that from just the template you would need to assign your list to a xtscript variable and then split it to insert the include
2016-12-04 07:55 · (0)
* Lordeagle * Waplocus Make use of javascript that's the easiest remedy
2016-12-04 07:59 · (0)
* Waplocus * Graham not reali advanced in xtscript.. plz jst do it 4 me.
2016-12-04 08:29 · (0)
* 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)
* Waplocus * Graham Thank graham after printin my filelist using xt parser nw my pagination which i'm using my <xt:include file="/EXT/Pagination" /> is not working.
2016-12-04 09:55 · (0)
* Graham * Waplocus it should do
is the pagination included before this xtscript ?
I added include custom paging on mine and that's working
2016-12-04 10:00 (edited 2016-12-04 10:09 by Graham ) · (0)
* Waplocus * Graham After the filelist.
2016-12-04 10:13 · (0)
* Graham * Waplocus It is supposed to be before the filelist
on mine it does not work if it is included after the filelist function in the xtscript
2016-12-04 10:16 (edited 2016-12-04 10:20 by Graham ) · (0)
* Waplocus * Graham Thanks it works.
2016-12-04 10:24 · (0)
* Waplocus * Waplocus
<div class="Content">
<!--parser:xtscript-->
var $flist = <xt:filelist sort_type="name" sort_dir="desc" folder="/Zolo/SF" template="&lt;center&gt;&lt;div class=&quot;Content&quot;&gt;&lt;div align=&quot;center&quot;&gt;&lt;div class=&quot;NBg&quot;&gt;&lt;div id=&quot;NHead&quot;&gt;Name: .file_name_parsed.&lt;/div&gt;&lt;div id=&quot;NBody&quot;&gt;&lt;img src=&quot;http://waplocus.cf/Themes/SOX/Image.png&quot; id=&quot;NPImg&quot;/&gt;This A Short DESCRIPTION For This File&lt;/div&gt;&lt;div align=&quot;right&quot;&gt;&lt;a href=&quot;/download?file=.file_name.&name=.file_name_parsed.&category=.file_mine.&size=.file_size.&href=.file_url.&date=.file_date.&time=.file_time.&quot;&gt;&lt;xt:include file=&quot;/Zolo/Scripts/EXT/Download&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/center&gt;&lt;!--*--&gt;" per_page="10" />
var $inc = xt:include file="/Zolo/Scripts/EXT/Slice"
print $flist
print <$inc/>
<!--/parser:xtscript-->
</div>

Copy code
2016-12-04 10:27 (edited 2016-12-04 10:27 by Waplocus ) · (0)

Online: Guests: 1