The Custom Formatters module allows users to easily create custom Field Formatters without the need to write a custom module. Custom Formatters can then be exported as CTools Exportables, Features or Drupal API Field Formatters.
-
Pluggable editor/renderer engines:
-
Formatter presets (default)
Create simple formatters from existing formatters with preset formatter settings. -
HTML + Tokens (default)
A HTML based editor with Token support. -
PHP (default)
A PHP based editor with support for multiple fields and multiple values. -
Twig
A Twig based editor provided by the Twig filter module.
-
-
Supports for all fieldable entities, including but not limited to:
- Drupal core - Comment, Node, Taxonomy term and User entities.
- Field collection module - Field-collection item entity.
- Media module - Media entity.
-
Exportable as:
- Drupal API formatter via:
- Custom Formatters export interface.
- CTools exportable via:
- Custom Formatters export interface.
- CTools Bulk Export module.
- Features module.
- Drupal API formatter via:
-
Live preview using real entities or Devel Generate.
-
Integrates with:
-
Coder Review
Review your Custom Formatter code for Drupal coding standards and more. -
Contextual links (Drupal core)
Adds a hover link for quick editing of Custom Formatters. -
Display Suite
Format Display Suite fields. -
Entity tokens
Leverages entity tokens for Field token support. -
Features
Adds dependent Custom Formatters (from Views or Content types) to Feature. -
Form Builder
Drag'n'Drop interface for builder Formatter Settings forms. -
Insert
Exposes Custom Formatters to the Insert module. -
Libraries API and the EditArea javascript library
Adds real-time syntax highlighting. -
Token
Adds the Token tree browser to the HTML + Tokens engine.
-
- Coder Review (via Coder)
- Devel Generate (via Devel)
- Entity tokens (via Entity API)
- Field tokens
- Form Builder
- Libraries API
- Token
Read the manual at: drupal.org/node/2514412
The EditArea javascript library adds real-time syntax highlighting, to install it follow these steps:
-
Download and install the Libraries API module.
-
Download the EditArea library and extract and move it into your libraries folder as 'editarea' (e.g., sites/all/libraries/editarea).
For easy downloading of Custom Formatters and it's required/recommended modules and/or libraries, you can use the following entries in your makefile:
projects[] = coder
projects[] = ctools
projects[] = custom_formatters
projects[] = devel
projects[] = entity
projects[] = field_tokens
projects[] = form_builder
projects[] = libraries
projects[] = options_element
projects[] = token
libraries[editarea][download][type] = get
libraries[editarea][download][url] = http://downloads.sourceforge.net/project/editarea/EditArea/EditArea%200.8.2/editarea_0_8_2.zip?r=&ts=1334742944&use_mirror=internode
Note: It is highly recommended to specify the version of your projects, the above format is only for the sake of simplicity.