Hello – I am trying to create a new theme for my OroCommerce install, as is suggested in the “Layouts” documentation (https://oroinc.com/b2b-ecommerce/doc/current/dev-guide/front-ui/layouts) and have created the required files as described in the guide, including default.yml – which seems to be defining the layout from scratch (and not overriding items from a parent theme/layout):PHP12345678910111213layout:actions:- '@setBlockTheme':themes: 'TestUIBundle:layouts:test/default.html.twig'- '@addTree':items:head:blockType: headmeta:blockType: metaoptions:http_equiv: Content-Typecontent: "text/html; charset=utf-8"
After I installed the theme on my server and set the active theme to my theme (from System->Configuration->Commerce->Design->Theme, however, I am now getting errors complaining “The head item already exists – use @remove to remove the item first from the parent”. I can understand this as my theme extends the “default” out-of-the-box theme:PHP123456parent: defaultlabel: My themedescription: My theme, extends Oro default theme.groups: [ commerce ]icon: bundles/test/img/favicon.icologo: bundles/test/img/logo.png
Can someone please guide me how to fix this – Since my theme’s look and feel is completely customised, I feel it’s perhaps easier to for my theme NOT to extend any out-of-the-box theme (i.e. trying to create it completely from scratch), but removing parent key from theme.yml throws errors (“Type error: Too few arguments to function Oro\Component\Layout\Extension\Theme\DataProvider\ThemeProvider::getIcon(), 0 passed and exactly 1 expected”)?
Is it recommended to create a theme for OroCommerce from scratch? if not, is there an example or template YAML file that I can use which overrides all the elements from the base out-of-the-box themes?
- This topic was modified 4 months, 2 weeks ago by peeush.
You must be logged in to reply to this topic.