Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

MINOR Using GridField instead of TableListField for SiteTree->getCMSF…

…ields() DependentPages (fixes #7239)
  • Loading branch information...
commit 8c1651ec59ee01aebb64bb9e993bdd5fda286dcf 1 parent a73e457
Ingo Schommer chillu authored
Showing with 6 additions and 9 deletions.
  1. +6 −9 code/model/SiteTree.php
15 code/model/SiteTree.php
View
@@ -1806,19 +1806,16 @@ function getCMSFields() {
if(class_exists('Subsite')) $dependentColumns['Subsite.Title'] = singleton('Subsite')->i18n_singular_name();
$dependentNote = new LiteralField('DependentNote', '<p>' . _t('SiteTree.DEPENDENT_NOTE', 'The following pages depend on this page. This includes virtual pages, redirector pages, and pages with content links.') . '</p>');
- $dependentTable = new TableListField(
+ $dependentTable = GridField::create(
'DependentPages',
- $this->DependentPages(),
- $dependentColumns
+ false,
+ $this->DependentPages()
);
- $dependentTable->setFieldFormatting(array(
+ $dependentTable->getConfig()->getComponentByType('GridFieldDataColumns')
+ ->setFieldFormatting(array(
'Title' => '<a href=\"admin/show/$ID\">$Title</a>',
'AbsoluteLink' => '<a href=\"$value\">$value</a>',
- ));
- $dependentTable->setPermissions(array(
- 'show',
- 'export'
- ));
+ ));
}
$baseLink = Controller::join_links (
Please sign in to comment.
Something went wrong with that request. Please try again.