You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In Shopware, we extend Twig's functionality by custom ones. See our own actions below.
::: info
Official support for complete Twig multi inheritance using sw_* equivalents available since 6.6.7.0
:::
::: warning
Templates which are imported via {% sw_use %} are not allowed to have additional twig statements outside of twig blocks. Therefore, changes in core templates which are imported via {% sw_use %} might break your app or plugin.
:::
Tags
Function
Description
Notes
sw_extends
Inherits from another file with support for multi inheritance. The API is the same like in Twig's default extends
Renders the content of another template file with support for multi inheritance. The is the same like in Twig's default include and the new sw_include tag
Adopts currency formatting: The currency symbol and the comma setting.
---
sw_sanitize
Filters tags and attributes from a given string. By default, twig's auto escaping is on, so this filter explicitly allows basic HTML tags like <i%gt;, <b>,...
---
Extensions
Extension
Description
Notes
sw_breadcrumb_full()
Returns all categories defined in the breadcrumb as an array
Contains functionalities of sw_breadcrumb_types and sw_breadcrumb_build_types
sw_breadcrumb()
Returns the category tree as array. Entry points of the SalesChannel ( e.g. footer, navigation) are filtered out.
Deprecated in 6.5.0
sw_breadcrumb_types()
Yields the types of the categories within the breadcrumb
Deprecated in 6.5.0
sw_breadcrumb_build_types()
returns the same as sw_breadcrumb_types, only without another repository call