* Waplocus * Waplocus Slice Content
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

Copy code

Please i'm trying to xt include slice into the filelist, bt is not working.
2016-12-04 10:29 (edited 2016-12-04 10:30 by Waplocus ) · (0)
* Graham * Waplocus You cannot include xtscript into xtscript using xt include
to do that you need to use a xtscript include from a .xt file
it still has to be before you print the list and you are not using the same name for the list in the two scripts and $l1 and $l2 hold the two parts not $flist
You seem to be making it far more complicated than you need to
2016-12-04 11:00 (edited 2016-12-04 11:04 by Graham ) · (0)
* Waplocus * Graham k plz can u help me wit the steps?.
2016-12-04 11:05 · (0)
* Waplocus * Waplocus K. if so.
2016-12-04 11:09 · (0)
* Graham * Waplocus It gets far too complicated as you have to start creating and calling functions
All you need to do is use the script I gave you with your own filelist
if you really want to print it from within the xtscript use
print $l1 <xt:include file="/file"> $l2
2016-12-04 12:03 (edited 2016-12-04 12:15 by Graham ) · (0)
* Waplocus * Graham Please graham the filielist is now okay. bt it is printin "var =1" before the start of the filist.
2016-12-04 19:53 · (0)
* Waplocus * Waplocus please i want to xt:include before the pagination. e.g
1
2
3
4
5
xt:include
6
7
8
9
10
xt:include
pagination(1,2,3...)

THANKS Graham.
2016-12-05 18:20 (edited 2016-12-05 20:03 by Waplocus ) · (0)
* Graham * Waplocus
Same idea except the marker goes in your custom paging
add <!--p--> to the start of the paging container
http://baretest.xtgem.com/ntest

# Paging container
if $page == 1
print <!--p--><div class="custom_paging">


Then extend the main script
<!--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

var $pos=call strpos $haystack=$l2; $needle=<!--p-->;
var $l3=call substr $val=$l2; $start=$pos
var $l2=call substr $val=$l2; $start=0 ; $length=$pos
<!--/parser:xtscript-->

<div>{_$$l1|}<xt:include file="/file" />{_$$l2|}<xt:include file="/file" />{_$$l3|}</div>

Copy code
2016-12-06 00:16 (edited 2016-12-06 00:27 by Graham ) · (0)
* Waplocus * Graham Thanks so much graham.
2016-12-06 00:34 · (0)
* Waplocus * Waplocus Wot about the below?.
xt:include
1
2
3
4
5
xt:include
6
7
8
9
10
xt:include
pagination(1,2,3...) THANKS Graham.
2016-12-06 00:36 · (0)

Online: Guests: 1