I’m trying to modify a skeleton the right way as suggested by the docs here.
After I set up the new mytheme, is it necessary include any other files, besides the elements I would like to change? For example, if I wanted to change a given background image, I thought it would be enough to to put this new image in the correct folder inside mytheme, but I didn’t work out?
Hi, you need at least the mytheme.yaml and mytheme.php files, and if the original theme referenced an image in its folder, then you also need to change that location by overriding the Twig file (or CSS file) that includes it.
Thanks flavio. Yes, that was also my understanding after reading the doc.
But, for example, on the twenty skeleton: when, on the original theme, I simply change the banner.jpg file on the twenty/images folder, the site renders the new image. But when I try to inherit the theme, following all of the steps listed on the doc, and then create a mytheme/images folder with the new banner.jpg file, nothing happens. Any additional pointers would be very welcome, thanks again.
Yes, because the original CSS or Twig that defines the image path is still the same, pointing to that image. You need to change that, which usually involves changing the path of the CSS or Twig file.
Thanks, I tried to do it via a custom.css file in the new theme (tried either mytheme/css/custom.css and mytheme/assets/css/custom.css) but for some reason the twenty theme doesn’t seem to compile the custom.css file, so I ended up defining the image via a mytheme/assets/css/main.css file and finally got it sorted