Sometimes I have several nodes (of different content types) with the same title. When I use the autocomplete field in ctools_node_content_type_edit_form to insert a node into a panel, it's hard to guess which node is the right one because the node title and the author are the same. It would be great if the content type would also be displayed.

To achieve this just 2 lines in ctools/includes/content.menu.inc have to be modified:

line 45 original:
$result = db_query_range(db_rewrite_sql("SELECT n.nid, n.title, u.name FROM {node} n INNER JOIN {users} u ON u.uid = n.uid WHERE $where"), $arg, 0, 10);

line 45 new:
$result = db_query_range(db_rewrite_sql("SELECT n.nid, n.title, n.type, u.name FROM {node} n INNER JOIN {users} u ON u.uid = n.uid WHERE $where"), $arg, 0, 10);

line 50 original:
$matches[$node->title . " [nid: $node->nid]"] = '<span class="autocomplete_title">' . check_plain($node->title) . '</span> <span class="autocomplete_user">(' . t('by @user', array('@user' => $name)) . ')</span>';

line 50 new:
$matches[$node->title . " [nid: $node->nid]"] = '<span class="autocomplete_title">' . check_plain($node->title) . '</span> <span class="autocomplete_user">(<span class="autocomplete_nodetype">' . check_plain($node->type) . '</span> ' . t('by @user', array('@user' => $name)) . ')</span>';

Is there someone who agrees? And someone who knows how to write a patch? I'm new to the community and not shure what's the right way to go ...

Comments

flokosiol’s picture

Priority: Normal » Minor

Change priority to MINOR

japerry’s picture

Status: Active » Closed (outdated)

Closing this issue as outdated as Drupal 6 ctools is not supported. If this issue is relevant for Drupal 7, feel free to re-open and mark for Drupal 7 (or 8)