From Habari Project

Jump to: navigation, search

This is my proposal for the implementation of Areas.

Proposal 1

My first proposal is my preferred proposal. It aims at a system of "sharing" blocks between areas, while allowing multiple instances of each block.

The UI mockup:

All the block types which plugins provide would be put into a "block library." From this library, blocks can be dragged into "scopes." When a block is dragged into a scope, a new instance of that block is created, with unique data.

Originally, there will be only one scope (the global scope). This scope will appear on all pages.

You will be able to create additional scopes, which will match specific rewrite rules (ex. search pages) or specific posts.

When a block is dragged between two scopes (from one scope to another) a virtual "link" is created, where the two scopes share the same instance of the block. Editing the block in either scope changes it in the other. You can think of this like the 2 scopes "share" the same block.

Each scope stores its own arrangement information independently of all other scopes.

Every block "instance" must have a unique name.

When a new scope is created, it will automatically "clone" the global scope, by linking all the global scope blocks to the new scope (as outlined above).

A block can be deleted from a scope by pressing its "delete" button. When the last copy of a block instance is deleted (in all scopes) the block instance is completely deleted.

When determining which scope to use when displaying a page, the most specific scope possible is used.

Personal tools