* Graham * antonosuke
If your filelist is using xtscript you could use this
wrap the file_name_base_parsed in the template with ||
like this
||.file_name_base_parsed.||
This is just a demo set the rest of your template yourself
The script steps through the names and replaces - with a space and removes the ||
<!--parser:xtscript-->
var $list=<xt:filelist folder="/files" template="&lt;span&gt;||.file_name_base_parsed.||&lt;/span&gt;&lt;br /&gt;" per_page="5"/>
var $spc=call chr $val=32
var $end=0
@loop
var $start=call strpos $haystack=$list;$needle=||;$offset=($end+2)
var $end=call strpos $haystack=$list;$needle=||;$offset=($start+2)
if $end
var $name=call substr $val=$list; $start=($start+2);$length=($end-$start-2)
var $new_name=call str_replace $subject=$name; $search=-;$replace=$spc
var $list=call str_replace $subject=$list; $search=||$name||;$replace=$new_name
goto @loop
endif
print $list
<!--/parser:xtscript-->

Copy code
2016-12-13 23:23 (edited 2016-12-14 00:42 by Graham ) · (0)

Online: Guests: 1