Animating contents
Animating contents
Details of the data model for block management
Section(s): animation, data model, standard plugin
Related plugins
- Dependant Child
- Optional Fields
Read also
Objects model (mandatories)
Content object for animation
An object with the flag 'contenttype' (in structure mode) can animate a website when it has all of these fields :
- blockcategory : a child to a blockcategory object
That's all folks.
Well, that's not totally true. If you create an object with just this field, you'll have no specific templates (just the common one) and a not really user-friendly contributive tool. We will see in the package content model section how we implemented it.
Content object with animations
To accept the attribution of blocks, a content object requires only one specific field :
| name | type | nature | description |
|---|---|---|---|
| blocks | text | Used to record the positions and keys of each blocks in the page view of this object. |
Warning : the field's name blocks has been chosen randomly, it has no links with the name used for our object block delivered in the package.
blockcategory
Each contents have to be categorized with this object.
It provides a content classification and open a lot of possibilities for access restrictions by security or context.
| name | type | nature | description |
|---|---|---|---|
| id | identity | identity | Engine native property |
| created | date (new) | Engine native property | |
| modified | date (new) | Engine native property | |
| owner | child | user | Engine native property |
| parent | sentence | Engine native property | |
| child | word | Engine native property | |
| status | child | workflowstandard | Engine native property |
| name | sentence | Engine native property | |
| activated | child | activated | Engine native property |
| parentcategory | child | blockcategory | Tree categorization |
Package model

With the plugin package, we provided an example of blocks implementation.
We created an object block (randomly chosen name) who extends the common content object model and allow the attribution of templates with a filter by type by adding some fields :
- type : a child to a blocktype object
- template : a child to a template object
blocktype
When we first thoughts of the principle of animating blocks, we wanted to create a simple system with a simple unified object.
We wanted to create a free HTML block, a video block, a list of link block, a list of links with a video and some pictures block.
To obtain this result, we added a block definition : the object blocktype.
A type declares which fields of the block object will be used at the same time in a desired template.
| name | type | nature | description |
|---|---|---|---|
| id | identity | identity | Engine native property |
| created | date (new) | Engine native property | |
| modified | date (new) | Engine native property | |
| owner | child | user | Engine native property |
| parent | sentence | Engine native property | |
| child | word | Engine native property | |
| status | child | workflowstandard | Engine native property |
| name | sentence | Engine native property | |
| activated | child | activated | Engine native property |
| config | text | Fields of an animation object separated by a comma, a semicolon or a space |
This object has been created to be compliant with the plugin optionnal fields. By activating it, when you'll choose a type of block, only the configured fields will be visible. The developpement of a new type will be shorter and the contribution easier.
template
The template object evolved with a new field to create a link between it and blocktype.
A new template type object as been created specially for block.
With this configuration, a template dedicated to a specific blocktype will have to be used exclusively with a block of the same type.
We strongly suggest the activation of the plugins dependant child and optionnal fields for a simplier use.
