Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

BUGFIX: Fixed page tree view

  • Loading branch information...
commit e7ecdf4b350b9b846ca735fe26f4b377bcccbcbf 1 parent bfe354d
@sminnee sminnee authored
Showing with 5 additions and 4 deletions.
  1. +5 −4 code/controllers/CMSMain.php
View
9 code/controllers/CMSMain.php
@@ -701,8 +701,8 @@ public function ListViewForm() {
$controller = $this;
$columns->setFieldFormatting(array(
- 'listChildrenLink' => function(&$item) use($controller) {
- $num = $item->numChildren();
+ 'listChildrenLink' => function($value, &$item) use($controller) {
+ $num = $item ? $item->numChildren() : null;
if($num) {
return sprintf(
'<a class="cms-panel-link list-children-link" data-pjax-target="ListViewForm,Breadcrumbs" href="%s?ParentID=%d&view=list">%s</a>',
@@ -712,8 +712,9 @@ public function ListViewForm() {
);
}
},
- 'getTreeTitle' => '<a class=\"cms-panel-link\" href=\"' .
- singleton('CMSPageEditController')->Link('show') . '/$ID\">$value</a>'
+ 'getTreeTitle' => function($value, &$item) use($controller) {
+ return '<a class="cms-panel-link" href="' . $controller->Link('show') . '/' . $item->ID . '">' . $item->TreeTitle . '</a>';
+ }
));
$listview = new Form(
Please sign in to comment.
Something went wrong with that request. Please try again.