【发布时间】:2014-02-27 03:41:38
【问题描述】:
我在这里浏览了 gridfield 类文档; http://doc.silverstripe.org/framework/en/reference/grid-field
这是有问题的代码。虽然它确实显示了一个网格字段,但它在每列上添加了一个按钮。我将如何编辑此代码以不显示按钮?这些按钮是指向不存在的页面的链接。 链接到渲染页面; http://www.silverstripe.org/assets/Uploads/Capture28.JPG
public function AllPages() {
$gridField = new GridField('pages', 'All pages', SiteTree::get());
$dataColumns = $gridField->getConfig()->getComponentByType('GridFieldDataColumns');
$dataColumns->setDisplayFields(array(
'Title' => 'Title',
'URLSegment'=> 'URL',
'LastEdited' => 'Changed'
));
return new Form($this, "AllPages", new FieldList($gridField), new FieldList());
}
【问题讨论】:
标签: php silverstripe