0

我有一个指向日历的本地索引,并获取 4 个最近的日历条目。我有一个迭代器迭代这些项目中的每一个并通过一些自定义标记输出它们。我可以使用以下方法轻松获取当前项目的标题:

#item.getTitle()#

但我不确定如何获取在项目上设置的发布日期。我该如何做到这一点?

4

1 回答 1

0

您可以访问一些日期。

// this would need to be explicitly set when editing the content node
item.get('releaseDate');

// This is when the first version was initially created
item.get('created');

// This is slightly mis-labelled.  It's when this actually version was saved
item.get('lastUpdate');
于 2017-05-16T22:04:15.463 回答