As you may have heard, “Snippets” will become “Blocks” in 7.0. In order to maintain 100% backwards compatibility, I’ve changed the way blocks will work from what I previously proposed.
I had posted earlier that the blocks syntax will look like this:
<div class="cms-block"> <h2 class="cms-block-content">This heading is editable.</h2> <p>This paragraph is not editable.</p> </div>
This would effectively destroy backwards compatibility, because by default the
cms-block element would not have been editable, whereas snippets are.
A more flexible approach (that also comes with easier to remember class names) builds off the
uneditable feature that exists in the current version.
By default, blocks will act just like snippets do, but you’ll be able to use the new
cms-enable classes to control what users can edit. For example:
<div class="cms-disable"> <h2 class="cms-enable">This heading is editable.</h2> <p>This paragraph is not editable.</p> </div>
In this case, you’ll only be able to edit the heading, while the rest of the block retains its structure.
This gives you the flexibility to create blocks that serve as simple code snippets as well as more complex, structured elements