Hi! i'm building my own taxonomy list after i've tried to implement Taxonomy List module with no luck. I'm using Views to make it, and it's almost done.
I'd like to know if it's hard to add a handler to the taxonomy image field in Views, for now we have just an option: "image". For the "Taxonomy: term" field, we have two: "no link" and "with link". It would be great to have: "image with link" as a handler for the taxonomy image field, so we can use that to link the image to the term node.
If it's impossible to do this, can you help me to figure out where and how to add it? this is the code for that view:
$view = new stdClass();
$view->name = 'Nenes';
$view->description = 'lista de productos para Nenes';
$view->access = array (
0 => '3',
1 => '1',
2 => '2',
);
$view->view_args_php = '';
$view->page = TRUE;
$view->page_title = 'Nenes';
$view->page_header = 'Está viendo las líneas de producto para nenes, dirijase a la sección <a href="productos/lineas">líneas</a> para ver todas.';
$view->page_header_format = '1';
$view->page_footer = '';
$view->page_footer_format = '1';
$view->page_empty = '';
$view->page_empty_format = '1';
$view->page_type = 'list';
$view->url = 'productos/nenes';
$view->use_pager = TRUE;
$view->nodes_per_page = '10';
$view->menu = TRUE;
$view->menu_title = '';
$view->menu_tab = FALSE;
$view->menu_tab_weight = '0';
$view->menu_tab_default = FALSE;
$view->menu_tab_default_parent = NULL;
$view->menu_tab_default_parent_type = 'tab';
$view->menu_parent_tab_weight = '0';
$view->menu_parent_title = '';
$view->sort = array (
);
$view->argument = array (
);
$view->field = array (
array (
'tablename' => 'term_data',
'field' => 'name',
'label' => '',
'handler' => 'views_handler_field_tid_link',
),
array (
'tablename' => 'term_image',
'field' => 'tid',
'label' => '',
'handler' => 'views_handler_image_path',
),
);
$view->filter = array (
array (
'tablename' => 'term_data',
'field' => 'vid',
'operator' => 'OR',
'options' => '',
'value' => array (
0 => '1',
),
),
array (
'tablename' => 'term_node',
'field' => 'tid',
'operator' => 'OR',
'options' => '',
'value' => array (
0 => '6',
),
),
);
$view->exposed_filter = array (
);
$view->requires = array(term_data, term_image, term_node);
$views[$view->name] = $view;
thanks a lot! great module!
Comments
Comment #1
nancydruNo, it's not impossible. I simple haven't yet figured out how. Look at the "function taxonomy_image_views_tables()" code. Please contribute it back as a patch. It would be even nicer if you could do it in 6.x as well.
BTW, what did Taxonomy List not do for you? Did you post issues? TL is going through a major rewrite, perhaps you should post in the "Wish List" over there.
Comment #2
jody lynnHere's a patch for Drupal 5. Will work on a Drupal 6 patch next.
Comment #3
nancydruThank you very much, once again, Jody. I added drupal_path_get_alias to the links. This is now applied to the 5.x version.
Comment #4
jody lynnStarted to take a look at this for 6.x but looks like it's already working. Worked for me on my short test.
Comment #5
nancydruThis was fixed several weeks ago.