0
在用於龍捲風-CMS頁面的控制,我請執行下列操作:如何在tornado.no/cms中存儲對頁面的更改?
def res = Service.tornado.articles([ articleCategoryPath: "boker/ny"]);
Service.tornado.loadFullArticles(res);
res.sort { a,b ->
b.props.year <=> a.props.year
}
tornado.small_articles = res;
或者更短:
tornado.small_articles = Service.tornado.articles([
articleCategoryPath: "boker/ny",
full: true ])
.sort { a, b -> b.props.year <=> a.props.year };
這將填充內容框small_articles
從一個特定的所有文章按文章道具year
反向排序的文件夾「boker/ny」。
它工作正常,但可以保存對內容框tornado.small_articles
所做的更改,以便從GUI中也可以看到文章的結果列表嗎?像Service.tornado.saveChangesToPageContentBox(page, content_box_nr, tornado.small_articles);
?
我剛剛從文檔中瞭解到,我可以通過在搜索查詢中添加'full:true'來完成整個操作。 'tornado.small_articles = Service.tornado.articles([articleCategoryPath:「boker/ny」,full:true])。sort {a,b - > b.props.year <=> a.props.year } – ivar