Skip to content

Commit 6c43038

Browse files
committed
Manual fixes
1 parent bef9903 commit 6c43038

File tree

8 files changed

+49
-51
lines changed

8 files changed

+49
-51
lines changed
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
ibexa_twig_components:
2+
admin-ui-user-menu:
3+
custom-html-component:
4+
type: html
5+
arguments:
6+
content: '<b>Hello world!</b>'
7+
custom-template-component:
8+
type: template
9+
arguments:
10+
template: '@ibexadesign/ui/component/user_thumbnail/user_thumbnail.html.twig'
11+
parameters:
12+
user_content:
13+
name: "Thumbnail"
14+
thumbnail:
15+
resource: https://placecats.com/100/100
16+
custom-controller-component:
17+
type: controller
18+
arguments:
19+
controller: '\App\Controller\MyController::requestAction'
20+
parameters:
21+
parameter1: 'custom'
22+
parameter2: true
23+
admin-ui-stylesheet-head:
24+
custom-link-component:
25+
type: stylesheet
26+
arguments:
27+
href: 'https://fonts.googleapis.com/css?family=Roboto:300,300i,400,400i,700,700i%7CRoboto+Mono:400,400i,700,700i&amp;display=fallback'
28+
rel: stylesheet
29+
crossorigin: anonymous
30+
integrity: sha384-LN/mLhO/GN6Ge8ZPvI7uRsZpiXmtSkep+aFlJcHa8by4TvA34o1am9sa88eUzKTD
31+
type: text/css
32+
admin-ui-script-head:
33+
custom-script-component:
34+
type: script
35+
arguments:
36+
src: 'https://doc.ibexa.co/en/latest/js/custom.js'
37+
crossorigin: anonymous
38+
defer: false
39+
async: true
40+
integrity: sha384-Ewi2bBDtPbbu4/+fs8sIbBJ3zVl0LDOSznfhFR/JBK+SzggdRdX8XQKauWmI9HH2
41+
type: text/javascript

code_samples/back_office/content_type/config/custom_services.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@ services:
44
arguments:
55
$template: '@@ibexadesign/content_type/edit/custom_tab.html.twig'
66
tags:
7-
- { name: ibexa.twig.component, group: 'content-edit-sections' }
7+
- { name: ibexa.twig.component, group: 'admin-ui-content-edit-sections' }

code_samples/user_management/oauth_google/config/custom_services.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,4 @@ services:
1010
arguments:
1111
$template: '@@ibexadesign/account/login/oauth2_login.html.twig'
1212
tags:
13-
- { name: ibexa.twig.component, group: login-form-after }
13+
- { name: ibexa.twig.component, group: admin-ui-login-form-after }

docs/administration/back_office/back_office_elements/custom_components.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
description: Back office components allow you to inject any custom widgets into selected places of the user interface.
33
---
44

5-
# Customizing the back office
5+
# Customizing the back office with Twig Components
66

77
You can customize many of the back office views by using [Twig components](components.md).
88
This allows you to inject your own custom logic and extend the templates.

docs/administration/back_office/back_office_tabs/back_office_tabs.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,4 +75,4 @@ Tag the group with `ibexa.twig.component`.
7575
`group` indicates where the group is rendered.
7676

7777
To learn more about this mechanism, see [Twig Components](components.md).
78-
And for the groups available in the back office, see [Back office elements > Custom components](custom_components.md).
78+
And for the groups available in the back office, see [custom components in the back office](custom_components.md).

docs/administration/back_office/customize_search_suggestion.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ The example template for this wrapping node is stored in `templates/themes/admin
135135
- At Twig level, it includes the item template, replaces Twig variables with the strings used by the JS renderer,
136136
and passes it to the [`escape` filter](https://twig.symfony.com/doc/3.x/filters/escape.html) with the HTML attribute strategy.
137137

138-
To be present, this wrapping node template must be added to the `global-search-autocomplete-templates` group of tabs components:
138+
To be present, this wrapping node template must be added to the `admin-ui-global-search-autocomplete-templates` group of tabs components:
139139

140140
``` yaml
141141
services:

docs/templating/components.md

Lines changed: 2 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -66,53 +66,10 @@ You can use an unique group name when creating a Twig Component to create your o
6666

6767
## Example
6868

69-
In the example below
69+
The following example shows how you can use each of the built-in components to customize the back office:
7070

71-
- A "Hello world!" is added to the user menu.
72-
- The current user thumbnail is a random cat.
73-
-
7471
``` yaml
75-
ibexa_twig_components:
76-
admin-ui-user-menu:
77-
custom-html-component:
78-
type: html
79-
arguments:
80-
content: '<b>Hello world!</b>'
81-
custom-template-component:
82-
type: template
83-
arguments:
84-
template: '@ibexadesign/ui/component/user_thumbnail/user_thumbnail.html.twig'
85-
parameters:
86-
user_content:
87-
name: "Thumbnail"
88-
thumbnail:
89-
resource: https://placecats.com/100/100
90-
custom-controller-component:
91-
type: controller
92-
arguments:
93-
controller: '\App\Controller\MyController::requestAction'
94-
parameters:
95-
parameter1: 'custom'
96-
parameter2: true
97-
admin-ui-stylesheet-head:
98-
custom-link-component:
99-
type: stylesheet
100-
arguments:
101-
href: 'https://fonts.googleapis.com/css?family=Roboto:300,300i,400,400i,700,700i%7CRoboto+Mono:400,400i,700,700i&amp;display=fallback'
102-
rel: stylesheet
103-
crossorigin: anonymous
104-
integrity: sha384-LN/mLhO/GN6Ge8ZPvI7uRsZpiXmtSkep+aFlJcHa8by4TvA34o1am9sa88eUzKTD
105-
type: text/css
106-
admin-ui-script-head:
107-
custom-script-component:
108-
type: script
109-
arguments:
110-
src: 'https://doc.ibexa.co/en/latest/js/custom.js'
111-
crossorigin: anonymous
112-
defer: false
113-
async: true
114-
integrity: sha384-Ewi2bBDtPbbu4/+fs8sIbBJ3zVl0LDOSznfhFR/JBK+SzggdRdX8XQKauWmI9HH2
115-
type: text/javascript
72+
[[= include_file('code_samples/back_office/components/twig_components.yaml') =]]
11673
```
11774

11875
## Render Twig Components

docs/users/oauth_client.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ Create the following template file in `templates/themes/admin/account/login/oaut
110110

111111
For more information about the OAuth connection URL Twig functions, see [`ibexa_oauth2_connect_path`](url_twig_functions.md#ibexa_oauth2_connect_path) and [`ibexa_oauth2_connect_url`](url_twig_functions.md#ibexa_oauth2_connect_url).
112112

113-
Finally, add the template to the login form by using the `login-form-after` [component](custom_components.md):
113+
Finally, add the template to the login form by using the `admin-ui-login-form-after` [Twig component group](components.md):
114114

115115
``` yaml
116116
services:

0 commit comments

Comments
 (0)