//var ix = wiki.getsearch{query: 'path:Nyheter/* ', max: 4, sortby:'-date'};
var ix = wiki.getsearch{query: 'path:Nyheter/* ', max:#wiki.getpage('Nyheter').subpages};
var new = [];
foreach (var x in ix) {
// <b>x.id .. ' ' ..x.title .. ' ' .. x.revisions[0].date;</b> <br />
// var t = string.Substr(x.text,0,110);
// t; <br />
let new ..= [{path: x.path, title:x.title, date:x.revisions[0].date, text:string.Substr(x.text,0,list.max(string.IndexesOf(string.Substr(x.text,0,110) , " ")))}];
}
var new2 = list.sort(new, "date", true, "date.compare($left, $right)");
var antal = 0;
if(#new2 > 4) {
let antal = #new2-4;
antal;
}
var news = list.splice(new2,4,antal);
{{p.title;}}
{{p.text}}...
PUBLICERAD: {{ date.Format(p.date, "yyyy-MM-dd") }} 