Adding custom classes to grid containers
Let's say I have two rows with four columns each and I want to add a gray background to the second row.
What I would like to be able to do is to add classes also to grid containers.
That way users could style the grid rows also if needed without me having to add the classes to the area in template.
Click it, and select Edit Area Design.
You'll get a little toolbar (view attached) - click the image icon and you can set a background colour/image there.
This would again add the new custom class to the whole area which is not the effect I am after for.
Let's say that I have Main Area. And I want the user to be able to add multiple rows to the area and still be able to style each row differently. For example give them each a different background color.
To achieve this at the moment I would have to be editing the template files a lot to add new areas to the page where users could then add custom classes.
But I would like the user to be able to add a new grid row to the area and then add a custom style just to that row.
So basically when usually the bootstrap grid would be something like:
<div class="container"> <div class="row"> <div class="col-xs-6"></div> <div class="col-xs-6"></div> </div> </div>
I would like to add a custom class like this:
<div class="row bg-red"> <div class="col-xs-6"></div> <div class="col-xs-6"></div> </div>
Where can you add the classes to layouts? I could not find that option. I only see the icons to move the layout and delete it.
1- I created a few presets (2 columns, 3 columns with bootstrap grid)
2- I added a layout in my area. I made it free grid 1 column
3- clicked on the layout and selected "add area design" and then the cog to add a custom class and I saved
4- I added a new layout to the previous layout and I selected one of my bootstrap presets
What I now have is
<div class="my-custom-class"> <div class="row"> <div class="col-sm4"></div> <div class="col-sm4"></div> <div class="col-sm4"></div> </div> </div>
core_area_layout << this is super helpful
There is a GitHub feature request issue for this:
I recommend posting to the issue to show your interest.
Any more or less firm deadline in mind?