Nota: POST UNDER CONSTRUCTION: This topic is intended to become a bookpage, under one of the following parents :
* Theme Snippets > Contributed Modules > Community building and Social Networking Modules > Content Construction Kit
> Content Costruction Kit Handbook > CCK for themers.
OR
> Related Modules.* Any other suggestion?
Please send your feedbacks HERE: http://drupal.org/node/192786 so that I can go on editing this post. Thank you.
Requirements
This configuration require the Workflow, CCK and Workflow_fields modules:
- http://drupal.org/project/workflow
- A workflow must already be set up and a few nodes concerned by the different workflow states.
- http://drupal.org/project/cck
- The CCK "Text" module must be enabled within the CCK modules list, in admin/build/modules
- http://drupal.org/project/workflow_fields
- The workflow_fields.module project extends the workflow module
by allowing CCK node fields to be made invisible or read-only depending
on the current workflow state. The workflow state form is extended to
show all node fields with appropriate controls to hide and/or disable
each field for that particular state.
- The workflow_fields.module project extends the workflow module
This topic will tell you HOW-TO show up the workflow state of the current node in its content as a field, with workflow_fields.
Nota: Please send your feedbacks HERE: http://drupal.org/node/192786 so that I can go on editing this post. Thank you.
First steps : creating the workflow state fields
A - Repeat the following steps for each workflow state of a definite workflow you have:
1° One by one, create a text field for each state of the workflow.
Note that if you have enabled the CCK "Widgets", note that only the "select list" option seems to work
* Call your field "workflowstate_current_state_title", by replacing current_state_title by your own state.
- This step ensure that the machine name will still be human readable later, by holding both a generic (workflowstate_) and a specific name (current_state_title).
- You may want to proceed in the order of your workflow, to make it simpler. Meanwhile drupal store/display them differently from a page to antoher.
* To create a field, go to admin/content/types and edit the node type (=content type) containing at least one node of each workflow state. Click on the "add a field" tab and create a new "text" field.
2° Make the field "obligatory". Do NOT choose "multiple value".
As the access is granted to a field and not to a field value, it is impossible to have a single workflow_state field with different values. There must be one field per state, so that they get filtered individually by the workflow_fields module. It allows more flexibility too.
3° Enter a unique value corresponding to the state. You can choose the current_state_title again at this step.
This step ensure that the field will show up, and allows a "default setting".
4° Go on with the following state, or go to STEP B - when you're finished with STEP A - .
Nota: Please send your feedbacks HERE: http://drupal.org/node/192786 so that I can go on editing this post. Thank you.
Configuration Steps : setting up the fields to display
B - *******>>> Repeat the following steps for each workflow state you have:
4- Enable it in each content type where the field_workflowstate may appear.
5- (default settings of) A_MODULE_ALLOWING_CCK_DEFAULTS will allow you to set the unique value as default value.
6- In each workflow state, disable for all users all the different state fields, in both "visible" and "editable" columns. Disable for all users as well the "editable" column (the right one) of the concerned state field. Then adapt the "visible" rights of the concerned state field according to the roles' access.
Nota: Please send your feedbacks HERE: http://drupal.org/node/192786 so that I can go on editing this post. Thank you.
Testing Steps : try the config on the content type chosen for the fields
-
-
- If your field show up properly =>
Nota: Please send your feedbacks HERE: http://drupal.org/node/192786 so that I can go on editing this post. Thank you.