Commit d81f159c authored by Dries's avatar Dries
Browse files

- Committed Nick's path improvements; you can now control the look and feel
  of the breadcrumb navigation.
parent b9633dcd
...@@ -41,6 +41,10 @@ function image($name) { ...@@ -41,6 +41,10 @@ function image($name) {
return "misc/$name"; return "misc/$name";
} }
function path($path) {
print "<div class=\"path\">". implode($path, " &raquo; ") ."</div>";
}
function node($node, $main) { function node($node, $main) {
if (module_exist("taxonomy")) { if (module_exist("taxonomy")) {
$terms = taxonomy_link("taxonomy terms", $node); $terms = taxonomy_link("taxonomy terms", $node);
......
...@@ -416,12 +416,9 @@ function book_view($node, $main = 0) { ...@@ -416,12 +416,9 @@ function book_view($node, $main = 0) {
foreach ($path as $level) { foreach ($path as $level) {
$trail[] = l($level->title, "node/view/$level->nid"); $trail[] = l($level->title, "node/view/$level->nid");
} }
theme("path", $trail);
$output .= "<div class=\"book\">"; $output .= "<div class=\"book\">";
$output .= "<div class=\"path\">". implode($trail, " &raquo; ") ."</div>";
$output .= "<div class=\"title\">$node->title</div>";
$output .= "<div class=\"last-updated\">". t("Last updated by %u on %d", array("%u" => format_name($node), "%d" => format_date($node->changed))) ."</div>";
$output .= "<div class=\"body\">$node->body</div>"; $output .= "<div class=\"body\">$node->body</div>";
if ($node->moderate) { if ($node->moderate) {
...@@ -456,10 +453,9 @@ function book_view($node, $main = 0) { ...@@ -456,10 +453,9 @@ function book_view($node, $main = 0) {
$output .= "<div class=\"titles\">$titles</div>"; $output .= "<div class=\"titles\">$titles</div>";
$output .= "</div>"; $output .= "</div>";
} }
$output .= "<div class=\"links\">". theme("links", link_node($node, $main)) ."</div>";
$output .= "</div>"; $output .= "</div>";
$node->body = $output;
print $output; theme("node", $node, 0);
} }
} }
......
...@@ -416,12 +416,9 @@ function book_view($node, $main = 0) { ...@@ -416,12 +416,9 @@ function book_view($node, $main = 0) {
foreach ($path as $level) { foreach ($path as $level) {
$trail[] = l($level->title, "node/view/$level->nid"); $trail[] = l($level->title, "node/view/$level->nid");
} }
theme("path", $trail);
$output .= "<div class=\"book\">"; $output .= "<div class=\"book\">";
$output .= "<div class=\"path\">". implode($trail, " &raquo; ") ."</div>";
$output .= "<div class=\"title\">$node->title</div>";
$output .= "<div class=\"last-updated\">". t("Last updated by %u on %d", array("%u" => format_name($node), "%d" => format_date($node->changed))) ."</div>";
$output .= "<div class=\"body\">$node->body</div>"; $output .= "<div class=\"body\">$node->body</div>";
if ($node->moderate) { if ($node->moderate) {
...@@ -456,10 +453,9 @@ function book_view($node, $main = 0) { ...@@ -456,10 +453,9 @@ function book_view($node, $main = 0) {
$output .= "<div class=\"titles\">$titles</div>"; $output .= "<div class=\"titles\">$titles</div>";
$output .= "</div>"; $output .= "</div>";
} }
$output .= "<div class=\"links\">". theme("links", link_node($node, $main)) ."</div>";
$output .= "</div>"; $output .= "</div>";
$node->body = $output;
print $output; theme("node", $node, 0);
} }
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment