? views-argument-title-to-id.patch
Index: modules/node/views_plugin_argument_validate_node.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/views/modules/node/views_plugin_argument_validate_node.inc,v
retrieving revision 1.2
diff -u -p -u -p -r1.2 views_plugin_argument_validate_node.inc
--- modules/node/views_plugin_argument_validate_node.inc	10 Jun 2009 22:04:57 -0000	1.2
+++ modules/node/views_plugin_argument_validate_node.inc	21 Jul 2010 01:41:19 -0000
@@ -48,6 +48,7 @@ class views_plugin_argument_validate_nod
       '#options' => array(
         'nid' => t('Node ID'),
         'nids' => t('Node IDs separated by , or +'),
+        'title' => t('Node Title'),
       ),
       '#default_value' => isset($this->argument->options['validate_argument_nid_type']) ? $this->argument->options['validate_argument_nid_type'] : 'nid',
       '#process' => array('views_process_dependency'),
@@ -117,6 +118,32 @@ class views_plugin_argument_validate_nod
         $this->argument->validated_title = implode($nids->operator == 'or' ? ' + ' : ', ', $titles);
         // If this is not empty, we did not find a nid.
         return empty($test);
+	break;
+      case 'title':
+        if (!empty($this->argument->options['transform_dash'])) {
+	  $argument = strtr($argument, '-', ' ');
+        }
+        if($types) {
+          $and = " AND type IN ('" . implode("', '", $types) . "')";
+        }
+        $node = db_fetch_object(db_query("SELECT * from {node} WHERE title = '%s'$and", $argument));
+        if(!$node) {
+          return FALSE;
+        }
+        if (!empty($this->argument->options['validate_argument_node_access'])) {
+          if (!node_access('view', $node)) {
+            return FALSE;
+          }
+        }
+
+        $this->argument->validated_title = check_plain($node->title);
+	if ($this->argument->options['field'] == 'nid') {
+	        $this->argument->argument = $node->nid;
+        } else {
+                $this->argument->argument = $node->title;
+        }
+	
+        return TRUE;
     }
   }
 }
