Hot answers tagged

2

As far as I know, this is not possible at the moment. You would need to build a custom importer and re-post existing block IDs as part of the sortOrder array. See more in the documentation.


2

For anyone who may come to this in future, I've found a workaround that achieves the same thing: Retrieve data from each matrix block separately do any filtering needed on each block separately merge the two resulting arrays, and use the 'sort' filter https://twig.symfony.com/doc/3.x/filters/sort.html Resulting code is as below: {# Get data from first ...


1

In general, Matrix fields support delta saves, so you can mix existing blocks with new blocks when saving matrix fields. This is documented here. Retaining existing blocks involves passing a sortOrder to the field which includes the IDs of all existing blocks you want to keep as well as an identifier for the newly created blocks. Adding new blocks ...


Only top voted, non community-wiki answers of a minimum length are eligible