Default theme overrides basic elements

Questions around the TYPO3 integration and plugins
Forum rules
Always add your TYPO3, Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
Moritz
Advanced
Posts: 119
Joined: 07 Nov 2018, 14:05

Default theme overrides basic elements

Post by Moritz » 20 Sep 2022, 13:38

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!
Ubuntu 22.04.01
PHP 7.4.30
Typo3 v11.5.19 LTS
Aimeos web shop 22.10.4-pre2

User avatar
aimeos
Administrator
Posts: 6738
Joined: 01 Jan 1970, 00:00

Re: Default theme overrides basic elements

Post by aimeos » 21 Sep 2022, 07:05

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.
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

Moritz
Advanced
Posts: 119
Joined: 07 Nov 2018, 14:05

Re: Default theme overrides basic elements

Post by Moritz » 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)?

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?
Ubuntu 22.04.01
PHP 7.4.30
Typo3 v11.5.19 LTS
Aimeos web shop 22.10.4-pre2

User avatar
aimeos
Administrator
Posts: 6738
Joined: 01 Jan 1970, 00:00

Re: Default theme overrides basic elements

Post by aimeos » 22 Sep 2022, 15:15

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.
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

Moritz
Advanced
Posts: 119
Joined: 07 Nov 2018, 14:05

Re: Default theme overrides basic elements

Post by Moritz » 23 Sep 2022, 06:56

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?
Ubuntu 22.04.01
PHP 7.4.30
Typo3 v11.5.19 LTS
Aimeos web shop 22.10.4-pre2

User avatar
aimeos
Administrator
Posts: 6738
Joined: 01 Jan 1970, 00:00

Re: Default theme overrides basic elements

Post by aimeos » 24 Sep 2022, 06:17

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
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

Moritz
Advanced
Posts: 119
Joined: 07 Nov 2018, 14:05

Re: Default theme overrides basic elements

Post by Moritz » 26 Sep 2022, 07:47

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!
Ubuntu 22.04.01
PHP 7.4.30
Typo3 v11.5.19 LTS
Aimeos web shop 22.10.4-pre2

Post Reply