You are here

function theme_flag_lists_user_list in Flag Lists 7

Same name and namespace in other branches
  1. 6 flag_lists.module \theme_flag_lists_user_list()
  2. 7.3 flag_lists.module \theme_flag_lists_user_list()

Theme the output of user-defined list page

1 theme call to theme_flag_lists_user_list()
flag_lists_user_list in ./flag_lists.module
List the contents of a user-defined list

File

./flag_lists.module, line 208
The Flag Lists module.

Code

function theme_flag_lists_user_list($variables) {
  $uid = $variables['uid'];
  $fid = $variables['fid'];
  $flag = flag_lists_get_flag($fid);
  drupal_set_title($flag->title);
  $content = flag_lists_get_flagged_content($fid, $uid);
  foreach ($content as $item) {
    if ($item->content_type == 'node') {
      $node = node_load($item->content_id);
      $items[] = l($node->title, 'node/' . $node->nid);
    }
  }
  $breadcrumb = menu_get_active_breadcrumb();
  $breadcrumb[] = l(t('@name lists', array(
    '@name' => drupal_ucfirst(variable_get('flag_lists_name', t('lists'))),
  )), 'user/' . arg(1) . '/flags/lists');
  drupal_set_breadcrumb($breadcrumb);
  return theme('item_list', array(
    'items' => $items,
  ));
}