Pattern Syntax: Content (CCK)
Valid properties for "content" action
- name (human readable name, unique, required)
- type (machine-readable name, unique, required)
- description
- title_label
- body_label
- min_word_count
- help (submission guidelines)
- node_options (Workflow settings) - required when workflow settings contain additional options besides 4 Drupal core default ones (status, promote, sticky, revision)
- status - alias for node_options['status']
- promote - alias for node_options['promote']
- sticky - alias for node_options['sticky']
- revision - alias for node_options['revision']
- has_body - set to 0 if you want to remove/omit body field from this content type
-
comment
valid values: 0 - Disabled, 1 - Read only, 2 - Read/Write (default) -
comment_default_mode
valid values: 1 - Flat list - collapsed, 2 - Flat list - expanded, 3 - Threaded list - collapsed, 4 - Threaded list - expanded (default) -
comment_default_order
valid values: 1 - Date - newest first (default), 2 - Date - oldest first - comment_default_per_page - valid values: integer (default 50)
-
comment_controls
valid values: 0 - Display above the comments, 1 - Display below the comments, 2 - Display above and below the comments, 3 - Do not display (default) -
comment_anonymous - (This option is enabled only when anonymous users have permission to post comments on the permissions page.)
valid values: 0 - Anonymous posters may not enter their contact information (default) 1 - Anonymous posters may leave their contact information 2 - Anonymous posters must leave their contact information -
comment_subject_field
valid values: 0 - Disabled (default), 1 - Enabled -
comment_preview
valid values: 0 - Optional, 1 - Required (default) -
comment_form_location
valid values: 0 - Display on separate page (default) 1 - Display below post or comments -
upload
valid values: 0 - disabled, 1 - enabled (default)
status, promote, sticky and revision will be ignored if node_options is defined.
Default values are used if you leave respective field undefined.
All comment fields depend on comment module and upload field depends on Upload module. If those modules are disabled, corresponding fields won't have any effect on site configuration.
Note that other modules may add more fields to this form.
<type> is used as unique identifier for each <content> action and is always required.
If "type" already exist it will be updated, otherwise new content type will be created.
Valid properties for "group" action
- label (required)
- name (required, unique)
- type (content type this group belongs to - machine readable name of already existing content type)
- weight
-
style
valid values: * fieldset (always open) * collapsible * collapsed - form_description (description that goes to the node editing form)
- display_description (description that goes to the node display page)
Valid properties for "field" action
- type (content type this field belongs to - machine readable name of already existing content type)
- name - machine-readable name of the field. This name cannot be changed.
- label - human-readable name
- option - type of data (field type)
- widget - type of form element presented to the user
- required
- multiple - number of values (0 - singular, 1 - unlimited, 2-10 - specific number of values)
- default_value
- description - help text for the node editing form
- size - Size of textfield
- text_processing - 0 - plain text, 1 - filtered text
- max_length
- allowed_values
- allowed_values_php
- rows - number of rows for textarea
List of common field types and associated widgets:
(this list needs to be updated and extended to cover more fields)
-
date - Date
-
date_select - Select List
default_value default_value_code default_value2 default_value_code2 input_format input_format_custom year_range increment advanced label_position text_parts year month day hour minute second label_position text_parts description group required multiple repeat todate granularity year month day hour minute output_format_date output_format_custom output_format_date_long output_format_custom_long output_format_date_medium output_format_custom_medium output_format_date_short output_format_custom_short tz_handling timezone_db - date_text - Text Field with custom input format
- date_popup - Text Field with Date Pop-up calendar
-
-
datestamp - Datestamp
- date_select - Select List
- date_text - Text Field with custom input format
- date_popup - Text Field with Date Pop-up calendar
-
datetime - Datetime
- date_select - Select List
- date_text - Text Field with custom input format
- date_popup - Text Field with Date Pop-up calendar
-
number_decimal - Decimal
- number - Text field
min max precision (10-32, default 10) scale (0-2, default 2) decimal (. , space - default .) prefix suffix - optionwidgets_select - Select list
- optionwidgets_buttons - Check boxes/radio buttons
- optionwidgets_onoff - Single on/off checkbox
- number - Text field
-
filefield - File
-
filefield_widget - File Upload
file_extensions file_path max_filesize_per_file max_filesize_per_node list_default (1 - listed (default), 0 - hidden) force_list_default (0 - User Configurable (default), 1 - Enforce Default) show_description (1 - enabled (default), 0 - disabled) - filefield_combo - Extensible File
- imagefield_widget - Image
-
filefield_widget - File Upload
-
number_float - Float
- number - Text field
- optionwidgets_select - Select list
- optionwidgets_buttons - Check boxes/radio buttons
- optionwidgets_onoff - Single on/off checkbox
-
image - Image
- imagefield_widget - Image
file_extensions file_path max_filesize_per_file max_filesize_per_node max_resolution min_resolution custom_alt alt custom_title title list_default force_list_default show_description
- imagefield_widget - Image
-
number_integer - Integer
- number - Text field
- optionwidgets_select - Select list
- optionwidgets_buttons - Check boxes/radio buttons
- optionwidgets_onoff - Single on/off checkbox
-
link - Link
- link - Text Fields for Title and URL
url title (optional, required, value, none) title_value (required if "value" selected for title) enable_tokens display url_cutoff attributes target (default, _top, _blank, user) rel class
- link - Text Fields for Title and URL
-
nodereference - Node reference
- nodereference_select - Select list
- nodereference_buttons - Check boxes/radio buttons
- nodereference_autocomplete - Autocomplete text field
-
text - Text
- optionwidgets_select - Select list
- optionwidgets_buttons - Check boxes/radio buttons
- optionwidgets_onoff - Single on/off checkbox
- text_textfield - Text field
- text_textarea - Text area (multiple rows)
-
userreference - User reference
- userreference_select - Select list
- userreference_buttons - Check boxes/radio buttons
- userreference_autocomplete - Autocomplete text field
-
viewfield - View field
- viewfield_select - Select List
Valid properties for "display" action
- type - content type
- field (field and group are mutually exclusive. You should always set only one or the other.)
- group
-
label
valid values: * for group - above, hidden * for field - above, inline, hidden - displays
- teaser
- full
- rss
- token (depends on token module)
Other contrib modules my provide additional displays
Valid display fields
- format (valid values are display specific, see notes below)
- exclude (set to 1 if you want to exclude this field/group from the $content value passed to the node template)
When you use shorthand for display (e.g <teaser>hidden</teaser>), exclude filed will automatically be set to 0 (disabled).
Similarly when you use full syntax but specify only one field, the other one will be reset to its default value.
It is necessary to use full display syntax and specify both fields to avoid resetting of the fields that were not specified.
Valid values for "format" field
Group:
- no_style
- simple
- fieldset
- fieldset_collapsible
- fieldset_collapsed
- hidden
Textfield/textarea:
- default
- plain
- trimmed
- hidden
Date:
- default
- long
- medium
- short
- time
- time_timezone
- iso
- timestamp
- feed
- ical
- format_interval
- hidden
Image:
- default (Generic file)
-
all imagecache presets in the following formats
- presetname_default
- presetname_linked
- presetname_imagelink
- presetname_path
- presetname_url
- path_plain
- url_plain
- hidden
Link:
- default (Title, as link)
- url (URL, as link)
- plain (URL, as plain text)
- short (Short, as link with title "Link")
- label (Label, as link with label as title)
- separate (Separate title and URL)
- hidden
Examples for display field
Exclude a field from the teaser
-
tag: display
type: temoignage #content type name
field: accroche # field name
teaser: # display to act on
exclude: 1
Help improve this page
You can:
- Log in, click Edit, and edit this page
- Log in, click Discuss, update the Page status value, and suggest an improvement
- Log in and create a Documentation issue with your suggestion