add page information when editing a node
This commit is contained in:
parent
c751ee47ac
commit
e4216c8974
|
@ -143,9 +143,19 @@ class NodeAdminController extends AdminController
|
|||
]);
|
||||
}
|
||||
|
||||
$page = $entity->getPage();
|
||||
|
||||
if ($page !== null) {
|
||||
$pageConfiguration = $pageLocator->getPages()[get_class($page)] ?? null;
|
||||
} else {
|
||||
$pageConfiguration = null;
|
||||
}
|
||||
|
||||
return $this->render('@Core/site/node_admin/edit.html.twig', [
|
||||
'form' => $form->createView(),
|
||||
'entity' => $entity,
|
||||
'page' => $page,
|
||||
'pageConfiguration' => $pageConfiguration,
|
||||
'tab' => $tab,
|
||||
]);
|
||||
}
|
||||
|
|
|
@ -147,6 +147,10 @@
|
|||
<div id="form-node-page-action-keep" class="collapse show" data-parent="#node-page-action">
|
||||
<div class="card-body">
|
||||
{{ 'No action'|trans }}
|
||||
|
||||
{% if page and pageConfiguration %}
|
||||
({{ pageConfiguration.name }})
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
Loading…
Reference in a new issue