summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2010-01-04 20:12:59 +0000
committerDries Buytaert <dries@buytaert.net>2010-01-04 20:12:59 +0000
commitb7aece63d084c85e84303959ec05d06da38f786e (patch)
tree2fb4ad800b3b851a9159318cf2e8bc199721ba8a /modules
parentc4962c975688e2790d3a9c9ceab10b97d1d4f4dc (diff)
downloadbrdo-b7aece63d084c85e84303959ec05d06da38f786e.tar.gz
brdo-b7aece63d084c85e84303959ec05d06da38f786e.tar.bz2
- Patch #668650 by jhodgdon: fixed hook_view() example.
Diffstat (limited to 'modules')
-rw-r--r--modules/node/node.api.php9
1 files changed, 4 insertions, 5 deletions
diff --git a/modules/node/node.api.php b/modules/node/node.api.php
index eb948eae0..ab1673b72 100644
--- a/modules/node/node.api.php
+++ b/modules/node/node.api.php
@@ -999,11 +999,10 @@ function hook_validate($node, &$form) {
function hook_view($node, $view_mode = 'full') {
if (node_is_page($node)) {
$breadcrumb = array();
- $breadcrumb[] = array('path' => 'example', 'title' => t('example'));
- $breadcrumb[] = array('path' => 'example/' . $node->field1,
- 'title' => t('%category', array('%category' => $node->field1)));
- $breadcrumb[] = array('path' => 'node/' . $node->nid);
- menu_set_location($breadcrumb);
+ $breadcrumb[] = l(t('Home'), NULL);
+ $breadcrumb[] = l(t('Example'), 'example');
+ $breadcrumb[] = l($node->field1, 'example/' . $node->field1);
+ drupal_set_breadcrumb($breadcrumb);
}
$node->content['myfield'] = array(