Closed (fixed)
Project:
Editable Fields
Version:
5.x-0.1
Component:
Documentation
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
7 Aug 2007 at 15:52 UTC
Updated:
3 Oct 2007 at 20:42 UTC
Hi,
Thanks for the module. Instead of just asking of you to add a README.TXT, I'll help a bit ;):
1. Create a content type.
Content name = Editable
2. Create a View:
Page URL = EditFields
View Type = Editable list
Fields = Title, Caption.
In the caption set Option=Editable
Filter = Only Editable content type.
3. Create some nodes from the 'Editable' content type
4. Invoke the view - the caption field can be edited.
For the lazy among us you can import the CCK and Views:
CCK (Enable "Content Copy" module):
$content[type] = array (
'name' => 'Editable',
'type' => 'editable',
'description' => 'Editable Fields demo',
'title_label' => 'Title',
'body_label' => '',
'min_word_count' => '0',
'help' => '',
'node_options' =>
array (
'status' => true,
'promote' => true,
'sticky' => false,
'revision' => false,
),
'comment' => '2',
'old_type' => 'editable',
'orig_type' => '',
'module' => 'node',
'custom' => '1',
'modified' => '1',
'locked' => '0',
);
$content[fields] = array (
0 =>
array (
'widget_type' => 'text',
'label' => 'Caption',
'weight' => '0',
'rows' => '1',
'description' => '',
'default_value_widget' =>
array (
'field_caption' =>
array (
0 =>
array (
'value' => '',
),
),
),
'default_value_php' => '',
'group' => false,
'required' => '0',
'multiple' => '0',
'text_processing' => '0',
'max_length' => '',
'allowed_values' => '',
'allowed_values_php' => '',
'field_name' => 'field_caption',
'field_type' => 'text',
'module' => 'text',
'default_value' =>
array (
0 =>
array (
'value' => '',
),
),
),
);
Views:
$view = new stdClass();
$view->name = 'Editable_Fields';
$view->description = 'Editable_Fields Views demo';
$view->access = array (
);
$view->view_args_php = '';
$view->page = TRUE;
$view->page_title = '';
$view->page_header = '';
$view->page_header_format = '1';
$view->page_footer = '';
$view->page_footer_format = '1';
$view->page_empty = '';
$view->page_empty_format = '1';
$view->page_type = 'editablefields_list';
$view->url = 'editablefields';
$view->use_pager = TRUE;
$view->nodes_per_page = '10';
$view->sort = array (
);
$view->argument = array (
);
$view->field = array (
array (
'tablename' => 'node',
'field' => 'title',
'label' => '',
'handler' => 'views_handler_field_nodelink',
'options' => 'link',
),
array (
'tablename' => 'node_data_field_caption',
'field' => 'field_caption_value',
'label' => '',
'handler' => 'content_views_field_handler_group',
'options' => 'editable',
),
);
$view->filter = array (
array (
'tablename' => 'node',
'field' => 'status',
'operator' => '=',
'options' => '',
'value' => '1',
),
array (
'tablename' => 'node',
'field' => 'type',
'operator' => 'OR',
'options' => '',
'value' => array (
0 => 'editable',
),
),
);
$view->exposed_filter = array (
);
$view->requires = array(node, node_data_field_caption);
$views[$view->name] = $view;
Comments
Comment #1
Christefano-oldaccount commentedThanks, Amitaibu. It took me a minute to realize where the "editable" option was.
Comment #2
markfoodyburton commentedThanks for this!
Comment #3
richard.toner commentedI'm still pretty new to Drupal and am currently testing all of the CCK module to see how easy they would be to install and use for someone new to the Drupal environment. I am admittedly having trouble in using this module and have tried re-creating the steps taken that Amitaibu outlined, but to no avail. My apologies if the documentation is a lot clearer than I think it is, but I could not find a Title or a Caption field amongst the field list when creating the view. I located 'Node:Title' in the field list (if that is what you are referring to?), but could not find a single field that was labelled as 'Caption'.
I also apologise if this is a very obvious question, but how do you invoke a view?
My trouble with this module is probably due to my lack of experience with Views (and Drupal in general), but I would greatly appreciate any clarity to help me complete my testing of the module.
Comment #4
amitaibuHi,
Welcome to Drupal!
1. Enable the CCK content copy module
2. Import the CCK (administer> Content Type> Import).
3. Import the Views
4. Look at the Fields>caption - you can see the field is 'Editable'.
5. Invoke the view click on the 'View' tab on the top.
Amitai
Comment #5
(not verified) commented