Hey,
Using the CERN theme, is there any way to format the field labels? See attached screenshots - one from the D7 site with the [h2] labels, and the other from the D8 site where there is no formatting.
I found the solution eventually… it’s done through Display Suite. It seems you could do some codey thing with hook_form_alter, but as a non-developer I was looking for something that didn’t involve that
Unfortunately the module “Field Formatter” only seems to deal with the field itself, not its label. I spent a long time looking at modules, and my conclusion is are no D8 modules which seem to do this specifically (whereas in D7 there is). I couldn’t believe that the concept of formatting the node field labels seemed to no longer exist in D8 without having to code, but after a lot of research and litres of coffee, I found that Display Suite does the job. Seems like a sledgehammer to crack a nut to me, but hey ho, it works… [shrug]
This is what you have to do:
Go to Structure > Display Suite > Settings (in the sub-navigation menu line)
Tick ‘Enable Field Templates’
Under Default Field Template, select “Expert”
Save configuration.
…then…
Go to “Manage Display” tab of your content type or node.
Click on the cog for any of the field items you want to format
If “Expert” field template is selected (as it should be by default, but if not then select it) then you’ll see a list of the things you can format. I put [h2] for my label.
… I found it still didn’t work, but then found that if you select Display Suite to render the node, it works. To do this:
While still in the Manage Display tab, scroll to the bottom and under “Layout for page in default”, select one of the Display Suite layouts. I chose one column layout to replicate a simple page.