### Eclipse Workspace Patch 1.0 #P pulp Index: sites/all/modules/clickpath/clickpath.module =================================================================== --- sites/all/modules/clickpath/clickpath.module (revision 185) +++ sites/all/modules/clickpath/clickpath.module (working copy) @@ -36,6 +36,17 @@ return $items; } +/** + * Implementation of hook_theme(). + */ +function clickpath_theme() { + return array( + 'clickpath_recent_pages' => array( + 'arguments' => array('list' => NULL), + ), + ); +} + function clickpath_admin_settings() { $form = array(); @@ -59,6 +70,13 @@ '#description' => $description, ); + $form['clickpath_consider_list'] = array( + '#type' => 'textarea', + '#title' => t('Paths to consider'), + '#default_value' => variable_get('clickpath_consider_list', "node*"), + '#description' => $description, + ); + $form['clickpath_breadcrumb'] = array( '#type' => 'checkbox', '#title' => t('Override breacrumb trail'), @@ -96,12 +114,19 @@ if (user_access('view clickpath block') && $links = clickpath_get_paths()) { $list = array(); $links = array_reverse($links, TRUE); - foreach ($links as $path => $title) { - $list[] = l(_clickpath_truncate_title($title), $path, array('html' => TRUE)); + if (variable_get('clickpath_block_list_as_path', FALSE)) { + foreach ($links as $path => $title) { + $list[] = $path; + } + } + else { + foreach ($links as $path => $title) { + $list[] = l(_clickpath_truncate_title($title), $path, array('html' => TRUE)); + } } $block['subject'] = t('Recently visited pages'); - $block['content'] = theme('item_list', $list); + $block['content'] = theme('clickpath_recent_pages',$list); return $block; } } @@ -181,4 +206,13 @@ } $_SESSION['clickpath'] = $clickpath; } +} + +/** + * Prints list of clean pathes as a list. + * + * @param array $list - clean paths + */ +function theme_clickpath_recent_pages($list) { + return theme('item_list', $list); } \ No newline at end of file