jbroadway / elefant

Elefant, the refreshingly simple PHP CMS and web framework.
http://www.elefantcms.com
MIT License
208 stars 39 forks source link

Block group columns #315

Closed jbroadway closed 3 years ago

jbroadway commented 3 years ago

This extends the recent improvements to the blocks/group handler and adds the ability to define column layouts for each row when rows=on is set.

New capabilities include:

There's a new Column Layout button in the content block edit buttons, which adjusts the number of columns and their widths (responsive, of course) and provides edit buttons for each column individually:

Screen Shot 2021-01-07 at 9 21 58 PM

When you click the Add Block button, the following dialog appears before opening the content block form:

Screen Shot 2021-01-07 at 9 12 18 PM

In the content block add/edit forms, this is also accessible in the sidebar when editing a block from a page that has rows=on enabled:

Screen Shot 2021-01-07 at 9 15 11 PM

And the wysiwyg editor will also have a toggle so you can jump between editing each of column in the same form:

Screen Shot 2021-01-07 at 9 16 31 PM

To try it out, add this tag to your layout template:

{! blocks/group?wildcard=[id]-*&rows=on !}