I followed the many advices that the easiest way to learn theming in Plone 5 is to copy the Barceloneta theme and start customizing from there.
Now I have a theme that pleases me, but when I upgraded to Plone 5.0.3 I could not get the new improvements of the Barceloneta theme, for instance, the lead image properly centered in the modal pop-up, to be replicated in my theme.
In the old days of 'portal_skins', I used to have a "ploneCustom.css" that just overrides the few css I want to change, so when upgrading the Plone version, the "new" css is always applied.
How can I do the same with Plone 5, i.e., use Barceloneta as a 'base' theme, just change a few lines of css, and still have all the "fresh" css when upgrading?
that is an interesting question!
but actually it should be easy:
depend (somehow ) on
plonetheme.barceloneta/plonetheme/barceloneta/theme/less/barceloneta.plone.local.less, and you get the latest changes. you might want to look into this file and maybe depend on
You can also
You cannot depend on the index.html template, as far as I know.
 You can depend on these files via hardcoded fullpath from a
plonetheme.barceloneta checkout. It might work with depending on a github "CDN" url like done in barceloneta.plone.local.less file, if less can handle this. Or maybe environment variables. Or using traversal paths like
you can refer to mockup and its bowerpath using lessvariables defined in the registry in CMFPlone:
like so in your custom less
but there is no variable for barcelonetta. we may want to add one?
I appreciate your replies, but can you please explain your thoughts in more detail, so that someone who is not proficient with these new concepts like Less, Diazo, etc, be able to fully understand?
The directives in manifest.cfg
does not help?
When you talk about bowerPath and mockupPath is only as a exemple, right?
Did you follow the Theming Training and does it answer your questions about your initial problem?
I did not, but, you see, this is something that we used to be able to do since Plone 1.0....
do I need to say more??
It's just CSS, html.
easiest way to just provide overrides is to:
- add css file named "custom.css"
<link rel="stylesheet" href="custom.css"> to your index.html file in the head section
- make sure the to use
before rules in your rules.xml file so you can ensure custom.css is always added after all the other css.
<after css:theme-children="head" css:content="head link" />
<after css:theme-children="head" css:content="head style" />
<before css:theme-children="head" css:content="head link" />
<before css:theme-children="head" css:content="head style" />
<before css:theme-children="head" css:content="head link, head style" /> should also work
Hi, thanks, but I'm not quite sure what you mean, should I add the file and change the index.html and rules.xml in my theme or in Barceloneta?
Because if it is in Barceloneta, all my changes will be lost when there's a new Plone version, right?