You are here

function theme_recently_read_item_list in Recently Read 7

Same name and namespace in other branches
  1. 6 recently_read.module \theme_recently_read_item_list()
  2. 7.2 recently_read.module \theme_recently_read_item_list()

Return a themed list of recently read items.

Parameters

$items: An array of recently read items to be displayed in the list.

Return value

A string containing the list output.

1 theme call to theme_recently_read_item_list()
recently_read_block_view in ./recently_read.module
Implements hook_block_view().

File

./recently_read.module, line 368
Recently read module file. Displays a history of recently read nodes by currently logged in user.

Code

function theme_recently_read_item_list($variables) {
  $items = $variables['items'];
  if (count($items) == 0) {
    return t('Nothing has been read yet.');
  }

  // theme each individual item on the list
  foreach ($items as &$item) {
    $item = theme('recently_read_item', array(
      'item' => $item,
    ));
  }

  // theme the list
  return theme('item_list', array(
    'items' => $items,
  ));
}