You are here

function blog_view in Drupal 5

Same name and namespace in other branches
  1. 4 modules/blog.module \blog_view()
  2. 6 modules/blog/blog.module \blog_view()
  3. 7 modules/blog/blog.module \blog_view()

Implementation of hook_view().

File

modules/blog/blog.module, line 219
Enables keeping an easily and regularly updated web page or a blog.

Code

function blog_view($node, $teaser = FALSE, $page = FALSE) {
  if ($page) {

    // Breadcrumb navigation
    $breadcrumb[] = array(
      'path' => 'blog',
      'title' => t('Blogs'),
    );
    $breadcrumb[] = array(
      'path' => 'blog/' . $node->uid,
      'title' => t("@name's blog", array(
        '@name' => $node->name,
      )),
    );
    $breadcrumb[] = array(
      'path' => 'node/' . $node->nid,
    );
    menu_set_location($breadcrumb);
  }
  return node_prepare($node, $teaser);
}