Practical guides for developing and customizing the Oro application back-office design with themes, SCSS, Twig templates, and placeholders.
The Oro application back-office is a single-page application (SPA) combining server-rendered content via the Twig templating engine and client-rendered content with Underscore.js. You can customize it with themes, override SCSS styles, Twig and Underscore.js templates, and extend parts of a page with placeholders.
Templates (Twig)
Override Twig templates to change how back-office pages render. Includes guidance on finding templates with Twig Inspector.
Placeholders
Add ordered sets of blocks (templates or actions) to any part of the back-office UI without modifying the original templates.
Stylesheets (SCSS)
Register and build custom SCSS files for back-office themes.
Back-Office Themes
Create application-specific or reusable themes by defining CSS/SCSS files and theme properties.
OroPlatform uses the Twig templating engine to render back-office content. To find the template responsible for a specific element, use the Twig Inspector, which activates through the Symfony Profiler and opens the corresponding template in your IDE on click.To override a template, create a file at the same path under templates/bundles/. For example, to override Grid/widget/widget.html.twig from OroDataGridBundle:
Placeholders allow you to combine an ordered set of blocks (templates or actions) and render them in different parts of Twig templates — without modifying the originals.
Theme configuration files are merged during container compilation. To override an existing theme, create a settings.yml in the Resources/public/themes/<theme-name> directory of your bundle with only the values you want to change:
# src/Acme/Bundle/DemoBundle/Resources/public/oro/label: Custom Oro Themeicon: images/custom_favicon.ico
When overriding themes from third-party bundles, ensure your bundle is registered after the bundle whose theme you are overriding.
After any theme changes, clear the cache and dump assets: