Page 1 of 1

Default theme overrides basic elements

Posted: 20 Sep 2022, 13:38
by Moritz
The default elegance theme overrides very basic elements like header, body, footer, img or a.
Also bootstrap classes like .navbar are overridden.
This destroys the frontend styles of my sitepackage.
Is that the expected behaviour?
I think every style rule should start with the aimeos root class (.aimeos ...).
Maybe there is already a solution for that?
Thanks in advance!

Re: Default theme overrides basic elements

Posted: 21 Sep 2022, 07:05
by aimeos
Create your own theme using a copy of the CSS/JS files from the default theme. Then, remove all header and footer styles from the aimeos.css file so they don't interfere with yours.

Re: Default theme overrides basic elements

Posted: 21 Sep 2022, 13:05
by Moritz
With Typo3 it only works if I set the path to my custom CSS via TypoScript?
How it works with all the CSS files which are included for specific components (like catalog-lists.css)?

And how do you prefer migrate old templates and styles from v18 to v22?
Is there a way to keep the old ones and use the old elegance theme?
Or is it better to start from scratch?

Re: Default theme overrides basic elements

Posted: 22 Sep 2022, 15:15
by aimeos
Moritz wrote: 21 Sep 2022, 13:05 With Typo3 it only works if I set the path to my custom CSS via TypoScript?
How it works with all the CSS files which are included for specific components (like catalog-lists.css)?
In Aimeos 2022.x, there's a virtual file system defined for the theme files:
https://github.com/aimeos/aimeos-typo3/ ... hp#L40-L45
Moritz wrote: 21 Sep 2022, 13:05 And how do you prefer migrate old templates and styles from v18 to v22?
Is there a way to keep the old ones and use the old elegance theme?
Or is it better to start from scratch?
From a technical perspective, it's better to start from scratch resp. use the new CSS/JS files from the theme and add your custom code in your own CSS/JS file because the Aimeos frontend is now optimized for very fast page loading and top Google Lighthouse scores for best user experience.

Re: Default theme overrides basic elements

Posted: 23 Sep 2022, 06:56
by Moritz
In Aimeos 2022.x, there's a virtual file system defined for the theme files:
https://github.com/aimeos/aimeos-typo3/ ... hp#L40-L45
How can I configure the theme path that it takes the .css & .js files of my extension?

Re: Default theme overrides basic elements

Posted: 24 Sep 2022, 06:17
by aimeos
Use:

Code: Select all

plugin.tx_aimeos.settings.resource.fs-theme.baseurl = /url/path/to/directory
plugin.tx_aimeos.settings.resource.fs-theme.basedir = /absolute/path/to/directory

Re: Default theme overrides basic elements

Posted: 26 Sep 2022, 07:47
by Moritz
I found another way to archive this.
In my extension I create this file "typo3conf/ext/my_ext/Resources/Private/Config/resource.php".
There I can override the settings aswell.

Thank you very much for support!