Skip to content

Commit 96d3331

Browse files
committed
Added doc for additional parameter for ibexa_render
1 parent c5eb878 commit 96d3331

File tree

3 files changed

+70
-0
lines changed

3 files changed

+70
-0
lines changed

docs/release_notes/ibexa_dxp_v4.6.md

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,37 @@ month_change: false
1010

1111
<div class="release-notes" markdown="1">
1212

13+
[[% set version = 'v4.6.28' %]]
14+
[[= release_note_entry_begin("Ibexa DXP " + version, '2026-02-04', ['Headless', 'Experience', 'Commerce']) =]]
15+
16+
### Developer experience
17+
18+
#### Pass custom parameters to `ibexa_render()` Twig function
19+
20+
You can now pass custom parameters to templates when using the `ibexa_render()` Twig function with the new `params` option, similar to how you can with `render(controller())`.
21+
22+
This allows you to provide additional context or data to your view templates:
23+
24+
``` html+twig
25+
{{ ibexa_render(content, {
26+
'viewType': 'line',
27+
'method': 'inline',
28+
'params': {
29+
'custom_param': 'custom_value',
30+
'another_param': 'another_value'
31+
}
32+
}) }}
33+
```
34+
35+
The parameters are available in your template as regular variables.
36+
37+
For more information, see [`ibexa_render()` Twig function](content_twig_functions.md#ibexa_render).
38+
39+
### Full changelog
40+
41+
[[% include 'snippets/release_46.md' %]]
42+
[[= release_note_entry_end() =]]
43+
1344
[[% set version = 'v4.6.27' %]]
1445
[[= release_note_entry_begin("Ibexa DXP " + version, '2026-02-03', ['Headless', 'Experience', 'Commerce']) =]]
1546

docs/release_notes/ibexa_dxp_v5.0.md

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,37 @@ month_change: false
1010

1111
<div class="release-notes" markdown="1">
1212

13+
[[% set version = 'v5.0.6' %]]
14+
[[= release_note_entry_begin("Ibexa DXP " + version, '2026-02-04', ['Headless', 'Experience', 'Commerce']) =]]
15+
16+
### Developer experience
17+
18+
#### Pass custom parameters to `ibexa_render()` Twig function
19+
20+
You can now pass custom parameters to templates when using the `ibexa_render()` Twig function with the new `params` option, similar to how you can with `render(controller())`.
21+
22+
This allows you to provide additional context or data to your view templates:
23+
24+
``` html+twig
25+
{{ ibexa_render(content, {
26+
'viewType': 'line',
27+
'method': 'inline',
28+
'params': {
29+
'custom_param': 'custom_value',
30+
'another_param': 'another_value'
31+
}
32+
}) }}
33+
```
34+
35+
The parameters are available in your template as regular variables.
36+
37+
For more information, see [`ibexa_render()` Twig function](content_twig_functions.md#ibexa_render).
38+
39+
### Full changelog
40+
41+
[[% include 'snippets/release_50.md' %]]
42+
[[= release_note_entry_end() =]]
43+
1344
[[% set version = 'v5.0.5' %]]
1445

1546
[[= release_note_entry_begin("Ibexa DXP " + version, '2026-01-15', ['Headless', 'Experience', 'Commerce']) =]]

docs/templating/twig_function_reference/content_twig_functions.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ You can provide `ibexa_render()` with either a content item or a Location object
3232
|`content` or `location`|[`Content`](/api/php_api/php_api_reference/classes/Ibexa-Contracts-Core-Repository-Values-Content-Content.html), [`ContentAwareInterface`](/api/php_api/php_api_reference/classes/Ibexa-Contracts-Core-Repository-Values-Content-ContentAwareInterface.html) or [`Location`](/api/php_api/php_api_reference/classes/Ibexa-Contracts-Core-Repository-Values-Content-Location.html)|Content item or its location.|
3333
|`method`|`string`|(optional) [Rendering method](#rendering-methods). One of: `direct`, `inline`, `esi`, `ssi`. (Default method is `direct`)|
3434
|`viewType`|`string`|(optional) [View type](template_configuration.md#view-types). (Default view type is `embed`)|
35+
|`params`|`array`|(optional) Hash of variables to pass to the template.|
3536

3637
#### Rendering methods
3738

@@ -48,6 +49,13 @@ You can pass one of the following rendering methods to `ibexa_render()`:
4849
{{ ibexa_render(content, {'viewType': 'line'}) }}
4950
5051
{{ ibexa_render(content, {'method': 'inline'}) }}
52+
53+
{{ ibexa_render(content, {
54+
'viewType': 'line',
55+
'params': {
56+
'custom_param': 'custom_value'
57+
}
58+
}) }}
5159
```
5260

5361
## Content information

0 commit comments

Comments
 (0)