hey folks,

hi i have a profile field where users can tag themselves with taxonomy terms , i want to create taxonomy/term/% page on which all users can be listed who have tagged themselves with that particular term.i know its very much possible with views but just could not figure out how.please give some suggestions.

thanks

Comments

tobiasb’s picture

Category: task » support
Priority: Critical » Normal

just enable the view "taxonomy_term". And add your fields, filter etc.

merlinofchaos’s picture

Status: Active » Fixed

Note that the taxonomy_term view is a 'node' view, and as such getting it to display users isn't going to be easy. You'd need to create a new view. The thing is, taxonomy/term/XXX is all handled by one view. If you want to mix nodes and users, you can't do that.

However, use of the content_profile module, where each user gets a node, might be able to accomplish what you want a little better.

mayosjordan’s picture

the thing is when i checked my logs i had problem like Invalid argument supplied for foreach()" in /taxonomy.module i tried the normal way with taxonomy term view but it just isnt happening is there any way the problem is interfering with my views.

dawehner’s picture

@mayosjordan
If you say that there are errors

a) provide a view export
b) Take sure you are on the right issue.One issue has one single topic and not 3 different ones
c) If you say that there are errors, it helps if you have one example as comment.

Did you tryed the suggestions from #3 already? If yes please provide what you did already, i think we can fix this together :)

mayosjordan’s picture

thanks a lot derine, now i can see the power of drupal community here my export bio = content profile here


$view = new view;
$view->name = 'taxonomy_term_view';
$view->description = 'view of taxonomy terms';
$view->tag = '';
$view->view_php = '';
$view->base_table = 'node';
$view->is_cacheable = FALSE;
$view->api_version = 2;
$view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */
$handler = $view->new_display('default', 'Defaults', 'default');
$handler->override_option('relationships', array(
  'vid' => array(
    'label' => 'node',
    'required' => 0,
    'id' => 'vid',
    'table' => 'term_node',
    'field' => 'vid',
    'relationship' => 'none',
  ),
));
$handler->override_option('fields', array(
  'value' => array(
    'label' => '',
    'alter' => array(
      'alter_text' => 0,
      'text' => '',
      'make_link' => 0,
      'path' => '',
      'link_class' => '',
      'alt' => '',
      'prefix' => '',
      'suffix' => '',
      'target' => '',
      'help' => '',
      'trim' => 0,
      'max_length' => '',
      'word_boundary' => 1,
      'ellipsis' => 1,
      'html' => 0,
      'strip_tags' => 0,
    ),
    'empty' => '',
    'hide_empty' => 0,
    'empty_zero' => 0,
    'exclude' => 0,
    'id' => 'value',
    'table' => 'profile_values_profile_campus',
    'field' => 'value',
    'relationship' => 'vid',
  ),
  'name' => array(
    'label' => '',
    'alter' => array(
      'alter_text' => 0,
      'text' => '',
      'make_link' => 0,
      'path' => '',
      'link_class' => '',
      'alt' => '',
      'prefix' => '',
      'suffix' => '',
      'target' => '',
      'help' => '',
      'trim' => 0,
      'max_length' => '',
      'word_boundary' => 1,
      'ellipsis' => 1,
      'html' => 0,
      'strip_tags' => 0,
    ),
    'empty' => '',
    'hide_empty' => 0,
    'empty_zero' => 0,
    'link_to_user' => 1,
    'overwrite_anonymous' => 0,
    'anonymous_text' => '',
    'exclude' => 0,
    'id' => 'name',
    'table' => 'users',
    'field' => 'name',
    'relationship' => 'vid',
  ),
  'picture' => array(
    'label' => '',
    'alter' => array(
      'alter_text' => 0,
      'text' => '',
      'make_link' => 0,
      'path' => '',
      'link_class' => '',
      'alt' => '',
      'prefix' => '',
      'suffix' => '',
      'target' => '',
      'help' => '',
      'trim' => 0,
      'max_length' => '',
      'word_boundary' => 1,
      'ellipsis' => 1,
      'html' => 0,
      'strip_tags' => 0,
    ),
    'empty' => '',
    'hide_empty' => 0,
    'empty_zero' => 0,
    'imagecache_preset' => 'display_user_picture_preset',
    'exclude' => 0,
    'id' => 'picture',
    'table' => 'users',
    'field' => 'picture',
    'relationship' => 'vid',
  ),
));
$handler->override_option('arguments', array(
  'tid' => array(
    'default_action' => 'not found',
    'style_plugin' => 'default_summary',
    'style_options' => array(),
    'wildcard' => 'all',
    'wildcard_substitution' => 'All',
    'title' => '%1',
    'breadcrumb' => '',
    'default_argument_type' => 'fixed',
    'default_argument' => '',
    'validate_type' => 'none',
    'validate_fail' => 'not found',
    'break_phrase' => 1,
    'add_table' => 1,
    'require_value' => 0,
    'reduce_duplicates' => 0,
    'set_breadcrumb' => 0,
    'id' => 'tid',
    'table' => 'term_node',
    'field' => 'tid',
    'validate_user_argument_type' => 'uid',
    'validate_user_roles' => array(
      '2' => 0,
      '3' => 0,
    ),
    'relationship' => 'vid',
    'default_options_div_prefix' => '',
    'default_argument_fixed' => '',
    'default_argument_user' => 0,
    'default_argument_php' => '',
    'validate_argument_node_type' => array(
      'campus_mart' => 0,
      'movie_review' => 0,
      'page' => 0,
      'profile' => 0,
      'story' => 0,
    ),
    'validate_argument_node_access' => 0,
    'validate_argument_nid_type' => 'nid',
    'validate_argument_vocabulary' => array(
      '3' => 0,
      '4' => 0,
      '9' => 0,
      '11' => 0,
      '10' => 0,
    ),
    'validate_argument_type' => 'tid',
    'validate_argument_transform' => 0,
    'validate_user_restrict_roles' => 0,
    'validate_argument_node_flag_name' => '*relationship*',
    'validate_argument_node_flag_test' => 'flaggable',
    'validate_argument_node_flag_id_type' => 'id',
    'validate_argument_user_flag_name' => '*relationship*',
    'validate_argument_user_flag_test' => 'flaggable',
    'validate_argument_user_flag_id_type' => 'id',
    'validate_argument_php' => '',
    'override' => array(
      'button' => 'Override',
    ),
  ),
));
$handler->override_option('filters', array(
  'type' => array(
    'operator' => 'in',
    'value' => array(
      'profile' => 'profile',
    ),
    'group' => '0',
    'exposed' => FALSE,
    'expose' => array(
      'operator' => FALSE,
      'label' => '',
    ),
    'id' => 'type',
    'table' => 'node',
    'field' => 'type',
    'relationship' => 'none',
  ),
));
$handler->override_option('access', array(
  'type' => 'none',
));
$handler->override_option('cache', array(
  'type' => 'none',
));
$handler->override_option('style_plugin', 'table');
$handler = $view->new_display('page', 'Page', 'page_1');
$handler->override_option('path', 'taxonomy/term/%');
$handler->override_option('menu', array(
  'type' => 'none',
  'title' => '',
  'description' => '',
  'weight' => 0,
  'name' => 'navigation',
));
$handler->override_option('tab_options', array(
  'type' => 'none',
  'title' => '',
  'description' => '',
  'weight' => 0,
  'name' => 'navigation',
));

heres the export i want to point out i had this view working when i tried for the first time , but then in due course of time when i deleted my dummy users for site to go live i started getting Invalid argument supplied for foreach()" in path/to/taxonomy/taxonomy.module error after my each cron run 4 times i searched for the error and got a solution on http://drupal.org/node/259632 after which i modified my tables in phpmyadmin and error is gone this view is a node type , i tried user and term but they didnt quite worked out.

mayosjordan’s picture

Status: Fixed » Active

and sorry dereine for misspelling your name i am not so good with 'i' and 'e'

iamjon’s picture

mayosjordan,
did you ever find a solution for this? if yes please update so others may benefit.

iamjon’s picture

Status: Active » Closed (cannot reproduce)

I'm closing this from a lack of activity. Please feel free to reopen.