? .svn ? space_to_hyphen-530174-3.diff ? space_to_hyphen-530174-4.diff ? space_to_hyphen-530174-6.diff ? bulk_export/.svn ? css/.svn ? delegator/.svn ? delegator/css/.svn ? delegator/help/.svn ? delegator/images/.svn ? delegator/js/.svn ? delegator/plugins/.svn ? delegator/plugins/task_types/.svn ? delegator/plugins/tasks/.svn ? help/.svn ? images/.svn ? includes/.svn ? js/.svn ? page_manager/.svn ? page_manager/css/.svn ? page_manager/help/.svn ? page_manager/images/.svn ? page_manager/js/.svn ? page_manager/plugins/.svn ? page_manager/plugins/tasks/.svn ? page_manager/theme/.svn ? plugins/.svn ? plugins/access/.svn ? plugins/arguments/.svn ? plugins/content_types/.svn ? plugins/content_types/block/.svn ? plugins/content_types/custom/.svn ? plugins/content_types/form/.svn ? plugins/content_types/node/.svn ? plugins/content_types/node_context/.svn ? plugins/content_types/node_form/.svn ? plugins/content_types/term_context/.svn ? plugins/content_types/user_context/.svn ? plugins/content_types/vocabulary_context/.svn ? plugins/contexts/.svn ? plugins/relationships/.svn ? views_content/.svn ? views_content/plugins/.svn ? views_content/plugins/content_types/.svn ? views_content/plugins/views/.svn Index: plugins/arguments/term.inc =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/ctools/plugins/arguments/term.inc,v retrieving revision 1.6 diff -u -p -r1.6 term.inc --- plugins/arguments/term.inc 13 Jul 2009 17:55:56 -0000 1.6 +++ plugins/arguments/term.inc 20 Aug 2009 21:36:35 -0000 @@ -17,7 +17,7 @@ function ctools_term_ctools_arguments() 'keyword' => 'term', 'description' => t('Creates a single taxonomy term from a taxonomy ID or taxonomy term name.'), 'context' => 'ctools_term_context', - 'default' => array('input_form' => 'tid', 'breadcrumb' => TRUE), + 'default' => array('input_form' => 'tid', 'breadcrumb' => TRUE, 'convert_spaces' => TRUE), 'settings form' => 'ctools_term_settings_form', 'placeholder form' => 'ctools_term_ctools_argument_placeholder', 'breadcrumb' => 'ctools_term_breadcrumb', @@ -44,6 +44,9 @@ function ctools_term_context($arg = NULL break; case 'term': + if ($conf['convert_spaces']) { + $arg = str_replace('-', ' ', $arg); + } $terms = taxonomy_get_term_by_name($arg); if (count($terms) != 1) { foreach ($terms as $potential) { @@ -93,6 +96,13 @@ function ctools_term_settings_form(&$for '#default_value' => !empty($conf['breadcrumb']), '#description' => t('If checked, taxonomy term parents will appear in the breadcrumb trail.'), ); + + $form['settings']['convert_spaces'] = array( + '#title' => t('Convert hyphen to spaces'), + '#type' => 'checkbox', + '#default_value' => !empty($conf['convert_spaces']), + '#description' => t('If checked, hyphens (-) appearing in the path will be converted to a space when matching to the term name.'), + ); } /** @@ -128,7 +138,7 @@ function ctools_term_breadcrumb($conf, $ $current = array_shift($parents); $breadcrumb[] = l($current->name, 'taxonomy/term/' . $current->tid); } - + $breadcrumb = array_merge(drupal_get_breadcrumb(), array_reverse($breadcrumb)); drupal_set_breadcrumb($breadcrumb); }