Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ Place the icon in `public/assets/images` and run `yarn encore <dev|prod>` after

If you want to configure icons per SiteAccess, see [Icon sets](#icon-sets).

To see more configuration options, see [icon sizes](other_twig_filters.md).
To see more configuration options, see [the icon reference](icon_twig_functions.md).

### Access icons in Twig templates

Expand Down
13 changes: 13 additions & 0 deletions docs/templating/twig_function_reference/content_twig_functions.md
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,19 @@
{% endif %}
```

### `ibexa_taxonomy_entries_for_content()` filter

`ibexa_taxonomy_entries_for_content()` fetches names of content categories.

| Argument | Type | Description |
|---------------|------|-------------|
| `content` | [`Ibexa\Contracts\Core\Repository\Values\Content\Content`](../../api/php_api/php_api_reference/classes/Ibexa-Contracts-Core-Repository-Values-Content-Content.html) | Content item to display the category name for. |

Check failure on line 115 in docs/templating/twig_function_reference/content_twig_functions.md

View workflow job for this annotation

GitHub Actions / vale

[vale] docs/templating/twig_function_reference/content_twig_functions.md#L115

[Ibexa.VariablesGlobal] Use global variable '[[= product_name_base =]]' instead of 'Ibexa'
Raw output
{"message": "[Ibexa.VariablesGlobal] Use global variable '[[= product_name_base =]]' instead of 'Ibexa'", "location": {"path": "docs/templating/twig_function_reference/content_twig_functions.md", "range": {"start": {"line": 115, "column": 118}}}, "severity": "ERROR"}

```html+twig
{{ content|ibexa_taxonomy_entries_for_content|map(entry => "#{entry.name}")|join(', ') }}
```


## Non-content related queries

### `ibexa_render_content_query()`
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
---
description: Icon Twig functions enable referencing SVG icons in templates.
page_type: reference
---

# Other Twig filters
# Icon Twig functions

### `ibexa_icon_path()`

Expand Down Expand Up @@ -53,16 +54,16 @@ To change the default size, in the template add the modifier to the class name.

The list of available icon sizes:

|Size| Modifier|
|Modifier|Size|
|----|---------|
|`8px`|`--tiny`|
|`12px`|`--tiny-small`|
|`16px`|`--small`|
|`20px`|`--small-medium`|
|`24px`|`--medium`|
|`38px`|`--medium-large`|
|`48px`|`--large`|
|`64px`|`--extra-large`|
|`--tiny`|`8px`|
|`--tiny-small`|`12px`|
|`--small`|`16px`|
|`--small-medium`|`20px`|
|`--medium`|`24px`|
|`--medium-large`|`38px`|
|`--large`|`48px`|
|`--extra-large`|`64px`|

#### Icons reference

Expand Down Expand Up @@ -395,15 +396,3 @@ The following icons are available out-of-the-box:
| ![interface-block](img/icons/interface-block.svg.png) | `interface-block` |
| ![full-view](img/icons/full-view.svg.png) | `full-view` |
| ![un-full-view](img/icons/un-full-view.svg.png) | `un-full-view` |

### `ibexa_taxonomy_entries_for_content()`

`ibexa_taxonomy_entries_for_content()` fetches names of content categories.

| Argument | Type | Description |
|---------------|------|-------------|
| `content` | `Ibexa\Contracts\Core\Repository\Values\Content\Content` | Content item to display the category name for. |

```html+twig
{{ content|ibexa_taxonomy_entries_for_content|map(entry => "#{entry.name}")|join(', ') }}
```
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ In addition to the [native functions provided by Twig](https://twig.symfony.com/
"templating/twig_function_reference/product_twig_functions",
"templating/twig_function_reference/site_context_twig_functions",
"templating/twig_function_reference/storefront_twig_functions",
"templating/twig_function_reference/icon_twig_functions",
"templating/twig_function_reference/image_twig_functions",
"templating/twig_function_reference/url_twig_functions",
"templating/twig_function_reference/date_twig_filters",
"templating/twig_function_reference/ai_actions_twig_functions",
"templating/twig_function_reference/other_twig_filters",
], columns=4) =]]
2 changes: 1 addition & 1 deletion mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -293,14 +293,14 @@ nav:
- Content Twig functions: templating/twig_function_reference/content_twig_functions.md
- Date Twig filters: templating/twig_function_reference/date_twig_filters.md
- Field Twig functions: templating/twig_function_reference/field_twig_functions.md
- Icon Twig functions: templating/twig_function_reference/icon_twig_functions.md
- Image Twig functions: templating/twig_function_reference/image_twig_functions.md
- Product Twig functions: templating/twig_function_reference/product_twig_functions.md
- Site context Twig functions: templating/twig_function_reference/site_context_twig_functions.md
- Storefront Twig functions: templating/twig_function_reference/storefront_twig_functions.md
- URL Twig functions: templating/twig_function_reference/url_twig_functions.md
- User Twig functions: templating/twig_function_reference/user_twig_functions.md
- AI Twig functions: templating/twig_function_reference/ai_actions_twig_functions.md
- Other Twig filters: templating/twig_function_reference/other_twig_filters.md
- URLs and routes:
- URLs and routes: templating/urls_and_routes/urls_and_routes.md
- Custom breadcrumbs: templating/urls_and_routes/custom_breadcrumbs.md
Expand Down
3 changes: 2 additions & 1 deletion plugins.yml
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ plugins:
'guide/content_rendering/twig_function_reference/image_twig_functions.md': 'templating/twig_function_reference/image_twig_functions.md'
'guide/content_rendering/twig_function_reference/url_twig_functions.md': 'templating/twig_function_reference/url_twig_functions.md'
'guide/content_rendering/twig_function_reference/date_twig_filters.md': 'templating/twig_function_reference/date_twig_filters.md'
'guide/content_rendering/twig_function_reference/other_twig_filters.md': 'templating/twig_function_reference/other_twig_filters.md'
'guide/content_rendering/twig_function_reference/other_twig_filters.md': 'templating/twig_function_reference/icon_twig_functions.md'
'guide/content_rendering/urls_and_routes.md': 'templating/urls_and_routes/urls_and_routes.md'
'guide/content_rendering/custom_breadcrumbs.md': 'templating/urls_and_routes/custom_breadcrumbs.md'
'guide/content_rendering/design_engine/design_engine.md': 'templating/design_engine/design_engine.md'
Expand Down Expand Up @@ -531,6 +531,7 @@ plugins:
'getting_started/install_ez_platform.md': 'getting_started/install_ibexa_dxp.md'

'templating/layout/create_user_registration_form.md': 'customer_management/create_user_registration_form.md'
'templating/twig_function_reference/other_twig_filters.md': 'templating/twig_function_reference/icon_twig_functions.md'

'tutorials/platform_beginner/building_a_bicycle_route_tracker_in_ez_platform.md': 'tutorials/beginner_tutorial/beginner_tutorial.md'
'tutorials/platform_beginner/1_get_ready.md': 'tutorials/beginner_tutorial/1_get_ready.md'
Expand Down
Loading