You are here

function profile2_page_view in Profile 2 7.2

Same name and namespace in other branches
  1. 7 contrib/profile2_page.inc \profile2_page_view()

Profile view page.

1 string reference to 'profile2_page_view'
profile2_page_menu in contrib/profile2_page.module
Implements hook_menu().

File

contrib/profile2_page.inc, line 39
Adds separate pages for viewing and editing profiles.

Code

function profile2_page_view($profile) {

  // If there is only one breadcrumb (Home), add the user account link to it.
  $breadcrumb = drupal_get_breadcrumb();
  if (count($breadcrumb) == 1) {
    $account = user_load($profile->uid);
    $breadcrumb[] = l($account->name, "user/{$account->uid}");
    drupal_set_breadcrumb($breadcrumb);
  }
  drupal_set_title($profile
    ->label());
  return $profile
    ->view('page', NULL, TRUE);
}