Is editview compatible with Automatic Node Titles? If not, this would be a great feature to add.

Comments

summit’s picture

Subscribing, greetings, Martijn

summit’s picture

Subscribing, greetings, Martijn

gcassie’s picture

I'm trying to use editview to show a list of designations under a parent donation. The amount and fund fields are important, but title is not at all for these nodes. I was hoping autonodetitle would handle it, but it doesn't seem to.

I have a custom code module with this call:

function multi_custom_nodeapi(&$node, $op, $form = NULL, $a4 = NULL) { 
  if ($node->type == 'designation') {
    $node->title = 'designation';
  }
}

This, too, does not work. I've tried fiddling with the module weights, but not luck so far.

Has anyone managed to create node titles automatically within editview so far?

EDIT: I set my custom module's title to be -1, and cleared my cache, and now this seems to be working okay. Keep in mind its probably overkill, it would be better to find which $op to fire on and make a call to autonodetitle's appropriate function.

salad’s picture

After you install the autonode title module,
find and replace the editview_form_alter function as below.

function editview_form_alter($form_id, &$form) {
   // Max add for disable the node title
   
   if (auto_nodetitle_get_setting($form['#node']->type) == AUTO_NODETITLE_ENABLED) {
      // we will autogenerate the title later, just hide the title field in the meanwhile
      $form['title']['#value'] = 'ant';
      $form['title']['#type'] = 'value';
      $form['title']['#required'] = FALSE;
    }
    else if (auto_nodetitle_get_setting($form['#node']->type) == AUTO_NODETITLE_OPTIONAL) {
      // we will make the title optional
      $form['title']['#required'] = FALSE;
    }

   if ($form['#base'] == 'editview_node_form') {
    $form['submit']['#value'] = t('Update');
    if ($form['#node']->nid == '') {
      $form['submit']['#value'] = t('Add');
    }  
   }
}
agileware’s picture

Status: Active » Fixed

This has now been done in 5.x-1.x-dev.

It will be in the next release soon.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

summit’s picture

Hi, and how about the D6 version please?
Thanks a lot in advance for considering this!

Greetings, Martijn

agileware’s picture

This has been done in 6.x-1.0-beta1.

The issue was here - #377862: Unable to create nodes with automatic node title