Tiax
Can you give me one code has the same functionality as this code.
Without use to Xtscript but it still works.
<!--parser:xtscript-->
var $list = <xt:filelist sort_type="updated" sort_dir="desc" per_page="9" folder="fl" template="<div class="list1"><a href="/.file_name..html" title="<xt:include file="fl/.file_name."/">" rel="dofollow"><xt:include file="fl/.file_name."/></a></div>" filter=""/>
print $list
<!--/parser:xtscript-->
Copy code
The important point is this code, it does not take action without Xtscript
<xt:include file="fl/.file_name."/>
Copy code
Graham
Tiax A similar outcome without xtscript can be achieved using a javascript call in your filelist template
<script type="text/javascript" src="/includes/.file_name_base..js"></script>
Copy code
And then create the included files as javascripts
Here is an example site using javascripts in the filelist template
http://pagetest.xtgem.com/Alist
Irve
Graham When creating the include file do we have to make it in pure javascript, or we can just make it plain text file and add a .js extension?
Graham
Irve it is treated as a .js script so it has to be a proper javascript
There is a html5 javascript local file reader api but it's support is patchy and complex and I have not tested it.
google "read text files with javascript" and you will see the details
I will do some tests over the next few days to see how it works and the level of support (especially on mobile browsers)