Proposals/Page layout plugin type
From Mahara Wiki
< Proposals
The Page (known as the View in earlier versions) is one of the central pieces of functionality in Mahara. Currently users have a limited ability to customize the layout of a page via the "layout" tab; i.e. how many columns it should have, and how wide they should be. We're currently weighing between two alternative replacements to this system, one which is similar to the existing one but also adds "rows". The other which is a completely dynamic layout using the Javascript Masonry library.
This specification is for the idea of making Page layouts into a new plugin type, so that the row/column layout, the Masonry layout, and other Page layouts can all be implemented and deployed separately.
Each layout would need to provide the following:
1. A UI for the user to configure the layout (if it has any conficuration options). For instance, in the current layout, a user can specify how many columns. The UI should be displayable as a section in the Page's "layout" tab. It may be dynamic.
2. A UI for specifying where each block goes in the layout. This should be compatible with the current drag-and-drop block layout system, as well as providing non-JS fallback.
3. Database structures to hold any necessary Page config and Block config data for the layout. (Possibly this could be the same shared table for all of them? A config table? Or a serialized data structure put into a text column?)
4. CSS and JS to do the actual layout. It may be tricky to integrate this with Themes; possibly allow each theme to override the CSS and JS from a given Layout plugin?
5. If a user changes the Layout of their Page, we need the Page to not crash and die. At the least, it should move all the blocks into sensible default positions. Better, would be to somehow store the old positions so that if a user switches Layouts then switches back, all the blocks move back to their previous position.