I've been testing, stumbling and probing my way to mosaic the last few weeks and there's something I don't really get.
There are different types of tiles programmatically, transient and persistent tiles. Persistent tiles store their data on the context in an annotation, transient tiles need to get their data passed in from the request, or they pull variable data from the context fields, the plone.app.standardtiles viewlets etc.
There are quite some extra tiles now available in the community (see List of tested and production-ready plone.app.mosaic tiles for Plone 5.1?), but these are all persistent tiles.
But when I customise a layout in the Mosaic editor on a context and want to save it for re-use as a content layout on other conten items, persistent tiles totally break. If I look in the ZMI in plone.resources in what actually gets saved, its the 'html contents' of the whole tile urlencoeded and added as <div data-tile="path-to-tile/uuid?content=urlencoded-tile-div />
the uuid is not present on the different context where I want to activate that persistent tile and field information etc is not encoded either.
I have found references to an 'X-Tile-Persistent=Yes" setting I can pass in the query for a transient tile which suggests that a transient tiles' data is then persisted. Is this the way how I could store a reference to a persistent tile in a content-layout so that end users can apply the content layout and then fill int/change the data of the persistent tile?
Or is it simply not possible to create any contentlayout with persistent tiles already present?
Seems like bit pitty because the interesting stuff is only possible in Persistent Tiles. I wouldn't even want to pass in custom data, if it already would use the Defaults from the Schema that would be a start. It would also be fine if a developer/themer had to write the contentlayout by hand, but I haven't found any examples.
There's a technical discusion on persistence and the history in a ticket in the plone.app.mosaic issue tracker at https://github.com/plone/plone.app.mosaic/issues/334 , but I don't really get it. I just want to use/integratie plone.app.mosaic as is at the moment and know what is and what isn't possible in the default distribution available to the community.