Issue #2255369 by larowlan, Xano: DialogController does not respect ['#title'] for the page title.
parent
209ef5e8c7
commit
4b68f9afe4
|
@ -93,7 +93,7 @@ class DialogController {
|
|||
}
|
||||
|
||||
$content = drupal_render($page_content);
|
||||
$title = $this->titleResolver->getTitle($request, $request->attributes->get(RouteObjectInterface::ROUTE_OBJECT));
|
||||
$title = isset($page_content['#title']) ? $page_content['#title'] : $this->titleResolver->getTitle($request, $request->attributes->get(RouteObjectInterface::ROUTE_OBJECT));
|
||||
$response = new AjaxResponse();
|
||||
// Fetch any modal options passed in from data-dialog-options.
|
||||
$options = $request->request->get('dialogOptions', array());
|
||||
|
|
|
@ -95,6 +95,7 @@ function ajax_test_error() {
|
|||
function ajax_test_dialog_contents() {
|
||||
// This is a regular render array; the keys do not have special meaning.
|
||||
$content = array(
|
||||
'#title' => 'AJAX Dialog contents',
|
||||
'content' => array(
|
||||
'#markup' => 'Example message',
|
||||
),
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
ajax_test.dialog_contents:
|
||||
path: '/ajax-test/dialog-contents'
|
||||
defaults:
|
||||
_title: 'AJAX Dialog contents'
|
||||
_title: 'AJAX Dialog contents routing'
|
||||
_content: '\Drupal\ajax_test\Controller\AjaxTestController::dialogContents'
|
||||
requirements:
|
||||
_access: 'TRUE'
|
||||
|
|
Loading…
Reference in New Issue