Oro : Add class on oro_widget_render

46 views Asked by At

Do you know how we can add a css class to the twig oro_widget_render method? Or remove the container div from this method? Thanks for your help

I tried 'attr': {'class': 'widget-container-user-face'}, OR 'cssClass': 'widget-container-user-face', OR 'class': 'widget-container-user-face', On

{{ oro_widget_render({
     'widgetType': 'block',
     'url': path('test_user_face', {id: user.id}),
     'alias': 'test-user-face'
}) }}

Nothing changes. The options are loaded in a data attribute of the div then when the page is loaded they disappear.

1

There are 1 answers

0
Andrey Yatsenko On

You can use the oro/twig-inspector pre-installed extension to find, using the Symfony toolbar extension, what template is used to render the specific HTML part and how to override it.

To learn more, check the documentation https://doc.oroinc.com/frontend/storefront/debugging/