ACR permits to declare new slice types through the
User Defined Views in the
of the administration dashboard. User defined views permit to bind a set of fields to a genshi script
to render them.
Creating Custom Content¶
Add User Definied View form will ask for:
Namethe name of the slice type, will be used by the ADD menu to make possible to create slices of that type.
Fields Definitionfields of the content, refer to field types for syntax.
Codethe content genshi template code which will be used when rendering the slice. Refer to Genshi content for more details
Preview Templatea genshi template code which will be used when rendering a preview of the slice.
The fields of a custom content are defined through the
.ini syntax, refer to python
documentation for more details on the syntax.
Each entry inside the
[fields] section will define a field, the name of entry will be the field name and
the value will be the field type.
Valid field types are:
Every field can be defined with
name = type except for the
select type which requires a list of
valid options in the form
name = select option1, option2, option3
[fields] name=text price=text photo=file description=textarea