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
Lordeagle
Waplocus Make use of javascript that's the easiest remedy
Waplocus
Graham not reali advanced in xtscript.. plz jst do it 4 me.
Graham
Waplocus This is how it can be done
http://baretest.xtgem.com/ntest
Add
<!--*--> to the end of the filelist template (convert to
<!--*--> 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="<a href=".file_url.?__xt_download=1">.file_name_base_parsed.</a><br /><!--*-->" 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
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.
Graham
Waplocus it should do
is the pagination included before this xtscript ?
I added include custom paging on mine and that's working
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
Waplocus
Waplocus <div class="Content">
<!--parser:xtscript-->
var $flist = <xt:filelist sort_type="name" sort_dir="desc" folder="/Zolo/SF" template="<center><div class="Content"><div align="center"><div class="NBg"><div id="NHead">Name: .file_name_parsed.</div><div id="NBody"><img src="http://waplocus.cf/Themes/SOX/Image.png" id="NPImg"/>This A Short DESCRIPTION For This File</div><div align="right"><a href="/download?file=.file_name.&name=.file_name_parsed.&category=.file_mine.&size=.file_size.&href=.file_url.&date=.file_date.&time=.file_time."><xt:include file="/Zolo/Scripts/EXT/Download" /></a></div></div></div></div></center><!--*-->" per_page="10" />
var $inc = xt:include file="/Zolo/Scripts/EXT/Slice"
print $flist
print <$inc/>
<!--/parser:xtscript-->
</div>
Copy code