お知らせ
NEWS
-
param("limit", 5);
$page = (int) $cockpit->param("page", 1);
$total = $collections->count("news",["filter"=>[
"published"=>true
]]);
$posts = $collections->find("news",[
"populate"=>true,
"sort"=>["date"=>-1,"_created"=>1],
"filter"=>[
"published"=>true
],
"limit"=>$limit,
"skip"=>$limit*($page-1)
]);
?>
-
=h($post['title'])?>
=h($post['category'])?> -
=nl2br(h($post['text']))?>