Allow to sort block elements horizontal #11724
Replies: 2 comments
-
I ran into this problem today as well. |
Beta Was this translation helpful? Give feedback.
-
Having the option between a vertical and horizontal block list would enable us to create a more fluid layout, simply by using block elements and some flex/grid css. With two nested block list editors, one stock (vertical) and the nested one as horizontal, I was able to create a fluid grid system where the user simply adds the content blocks to the row (each block acts as a column), instead of choosing a fixed grid layout. I was able to hack the block list editor to render as a horizontal block list in the backoffice simply by tageting some elements with css, but the angular-ui-sortable js was a show stopper. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Currently in block list custom view we can add the class
blockelement__draggable-element
to make it sortable. Without this class the block isn't sortable.However this class limit the sorting on y-axis, which is okay in the standard block views.
https://github.com/umbraco/Umbraco-CMS/blob/v9/contrib/src/Umbraco.Web.UI.Client/src/views/propertyeditors/blocklist/umbBlockListPropertyEditor.component.js#L766-L779
In a custom view you may have a nested block list though, e.g. a "Image Grid" with a block list using nested "Image Box" elements.
image-grid.html
image-box.html
I think it would be useful to sort on x-axis as well in this case.
Beta Was this translation helpful? Give feedback.
All reactions