Storefront Twig functions¶
You can use storefront Twig functions to control the rendering of storefront elements.
ibexa_storefront_get_logo()
¶
ibexa_storefront_get_logo()
returns current shop logo (configured in ibexa.system.<scope>.storefront.logo
):
1 2 3 |
|
ibexa_storefront_get_name()
¶
ibexa_storefront_get_name()
returns current shop name (configured in ibexa.system.<scope>.storefront.name
):
1 2 3 |
|
ibexa_storefront_get_main_menu_alias()
/ ibexa_storefront_get_main_menu_options()
¶
ibexa_storefront_get_main_menu_alias()
returns the main menu alias.
ibexa_storefront_get_main_menu_options()
returns the main menu's options (configured in ibexa.system.<scope>.storefront.main_menu
/ ibexa.system.<scope>.storefront.main_menu_options
).
1 2 3 4 5 6 |
|
ibexa_storefront_create_inline_product_search_form()
¶
ibexa_storefront_create_inline_product_search_form()
creates a product search form:
1 2 3 |
|
ibexa_storefront_get_main_category()
¶
ibexa_storefront_get_main_category()
returns the main (first-level) category for a given category.
For example: if a given category is "Desks" and it has the following ancestors: "Furniture" > "Office" > "Desks", then the main category for "Office" is "Furniture".
1 2 3 |
|
ibexa_storefront_get_active_currency()
¶
ibexa_storefront_get_active_currency()
returns the active currency object (Ibexa\Contracts\ProductCatalog\Values\CurrencyInterface
).
1 2 3 |
|
ibexa_storefront_get_language_name_by_code()
¶
ibexa_storefront_get_language_name_by_code()
displays language name based on its code or locale.
1 2 3 |
|
ibexa_storefront_get_product_render_action()
¶
ibexa_storefront_get_product_render_action()
returns a rendering action to be used, as defined in settings.
It serves as an alternative for ibexa_render
which heavily relies on content objects being not present within context of remote PIM.
You can use this, for example, to parametrize the display of products by using a custom controller.
1 2 3 4 5 6 7 8 9 |
|
ibexa_get_anonymous_user_id()
¶
ibexa_get_anonymous_user_id()
returns the configured User ID for the anonymous user (configured in ibexa.system.<scope>.anonymous_user_id
).
1 |
|