The website designer offers building blocks in website edit mode, which can be dragged on the page. This recipe discusses how to offer your own blocks, called snippets, internally.
Offering snippets to the user
Getting ready
As we make use of the library.book model, get the codes from Chapter 5, Application Models, for my_module. For convenience, this recipe's code contains a copy of it.
How to do it...
A snippet is actually just a QWeb view that gets injected in the Insert blocks bar, which is defined by a QWeb view itself:
- Add a file called views/snippets.xml: ...