Creating a theme for plone 6 classic

Hello everyone, I have some experience as a front-end developer in Plone 4 and 5. Now I need to create a theme for a classic UI in Plone 6. To do this, I created a Plone 6 on my local Mac according to the documentation with cookieplone. At first glance, it looks very different from p5 with buildout... I then created a theme using plonecli create addon plonetheme.themebasedonbarceloneta and plonecli add theme_barceloneta, following the documentation. However, I am now completely at a loss as to where it belongs in the file system and how I can teach Plone 6 Classic to display the theme under Addons so that I can activate it. Can anyone help me with this?

This isn't an answer, but I have much empathy. We are in a between time, when Mastering Plone, Plone installation methods, add-on generators, and developer docs (as they are) are somewhat mismatched because everything has changed so much.

The first step created a Plone add-on. The second step created a theme inside the add-on. For development, you can then also use “plonecli build” to build Plone within the package. Plonecli should have created an install policy so after running Plone, the theme should be available and can be activated.

If you want to use this package in another project, you can add it to your dependencies. This depends on how you are building Plone. If using buildout, you add the theme in your eggs section:

  eggs  = package.one
          package.two
          newtheme.package

of your buildout .cfg file.

If using pip install with requirements.txt, you can add it there.

3 Likes

You have to get used to npm, bootstrap & C. Start changing some bootstrap variables and see what happen in npm run watch and if you see the changes. To see the changes plone has to be started in dev mode. Here: https://2022.training.plone.org/theming/theme_barceloneta.html#run-your-theme-package you can see the build/serve part for developing. After developing, you need you addon as egg to be installed locally with buildout or pip. The cookieplone template should have handled this for you. so if you start the project the egg should be available in the addons section.

Sneak preview: there’s a pending documentation PR for creating ”backend addons” … maybe this helps you Create a backend add-on — Plone Documentation v6 … otherwise feedback would be very welcome here Add Create a backend add-on section in the Developer guide with `GenericSetup` by stevepiercy · Pull Request #1757 · plone/documentation · GitHub