diff --git a/code/controllers/CMSPageAddController.php b/code/controllers/CMSPageAddController.php index c1881a85..14564425 100644 --- a/code/controllers/CMSPageAddController.php +++ b/code/controllers/CMSPageAddController.php @@ -81,6 +81,16 @@ class CMSPageAddController extends CMSPageEditController { ) ) ); + $parentField->setSearchFunction(function ($sourceObject, $labelField, $search) { + return DataObject::get( + $sourceObject, + sprintf( + "\"MenuTitle\" LIKE '%%%s%%' OR \"Title\" LIKE '%%%s%%'", + Convert::raw2sql($search), + Convert::raw2sql($search) + ) + ); + }); // TODO Re-enable search once it allows for HTML title display, // see http://open.silverstripe.org/ticket/7455