Skip to content

Commit b52a111

Browse files
committed
Clarify templates that require modification
1 parent 676c74b commit b52a111

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

code_samples/back_office/notifications/src/Notification/MyRenderer.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,10 @@ public function __construct(Environment $twig, RouterInterface $router)
2323

2424
public function render(Notification $notification): string
2525
{
26-
return $this->twig->render('@ibexadesign/notification.html.twig', ['notification' => $notification]);
26+
return $this->twig->render('@ibexadesign/notification.html.twig', [
27+
'notification' => $notification,
28+
'template_to_extend' => $templateToExtend,
29+
]);
2730
}
2831

2932
public function generateUrl(Notification $notification): ?string

code_samples/back_office/notifications/templates/themes/admin/notification.html.twig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
{% extends '@ibexadesign/account/notifications/list_item.html.twig' %}
1+
{% extends template_to_extend %}
22

33
{% trans_default_domain 'custom_notification' %}
44

docs/administration/back_office/notifications.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,8 +95,6 @@ The example below presents a modified renderer that uses Twig to render a list v
9595
[[= include_file('code_samples/back_office/notifications/src/Notification/ListRenderer.php') =]]
9696
```
9797

98-
Then, add the templates that are defined above as a response to `render_all` request:
99-
10098
## Notification timeout
10199

102100
To define the timeout for hiding Back-Office notification bars, per notification type, use the `ibexa.system.<scope>.notifications.<notification_type>.timeout` [configuration key](configuration.md#configuration-files):

0 commit comments

Comments
 (0)