0

想象一下由 CListView 呈现的一个简单的新闻项目列表。每个新闻项都有一个“insertDate”属性,我可以通过 $data->insertDate 访问它。现在,这样的列表看起来像这样呈现:

// example (how list is displayed now)
9-18-2012 - Stocks fell for 2nd week
9-18-2012 - Record heat for 2012
9-18-2012 - Crime down in the state
9-17-2012 - Stock woes are worrying investors
9-17-2012 - Business outlook is optimistic despite slow growth
9-16-2012 - More people moving into big cities
9-16-2012 - Stay ahead of the flu this year

我想要做的是在当天的所有项目上方显示一个日期标题,以便显示看起来更像这样(下图)。有没有办法调整 CListView 来做到这一点?

// example of what i want to do
=======News for 9/18======
Stocks fell for 2nd week
Record heat for 2012
Crime down in the state

=======News for 9/17======
Stock woes are worrying investors
Business outlook is optimistic despite slow growth

=======News for 9/16======
More people moving into big cities
Stay ahead of the flu this year
4

1 回答 1

1

你可以试试这个http://groupgridview.demopage.ru/或者这个http://www.yiiframework.com/extension/xdateview/。您可以根据以上两个创建自定义网格视图,祝您好​​运。

于 2012-09-19T00:12:16.150 回答