Custom Content

ACR permits to declare new slice types through the User Defined Views in the Advanced section of the administration dashboard. User defined views permit to bind a set of fields to a genshi script to render them.

Creating Custom Content

The Add User Definied View form will ask for:

  • Name the name of the slice type, will be used by the ADD menu to make possible to create slices of that type.
  • Fields Definition fields of the content, refer to field types for syntax.
  • Code the content genshi template code which will be used when rendering the slice. Refer to Genshi content for more details
  • Preview Template a genshi template code which will be used when rendering a preview of the slice.

Field Types

The fields of a custom content are defined through the .ini syntax, refer to python ConfigParser module 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: text, textarea, html, file, select. 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