* Graham * NoNDeSCRiPT The problem is that all the data is still read as there is no provision in the include function to only include part of the data
so the best way is to have a second folder containing the shortened files using the same file names and do your includes from that with a link that sets a variable used to include the full versions and a back button that returns to the list of short versions
this uses the same page to display the long version and the list of short versions
this script also has provision for a paged list
<xt:include file="/text/{_$file|}" />
<!--parser:xtscript-->
get_or_default __filelist_page;1
get file
var $url=<xt:url noquery="1" />
if $file
print <hr /><a href="$url?__filelist_page=$__filelist_page">Back</a>
else
var $list = <xt:filelist sort_type="name" sort_dir="asc" folder="/text_short" template="&lt;xt:include file=&quot;/text_short/.file_name.&quot; &gt; &lt;br /&gt;&lt;a href=&quot;$url?file=.file_name.&__filelist_page=$__filelist_page&quot;&gt; Read more &lt;/a&gt;&lt;hr /&gt;" per_page="3" />
print $list
endif
<!--/parser:xtscript-->

Copy code
http://banana.madpath.com/textin
2018-02-13 22:05 (edited 2018-02-13 22:33 by Graham ) · (1)

Online: Guests: 1