summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoao Ventura2008-02-12 01:07:09 (GMT)
committer Joao Ventura2008-02-12 01:07:09 (GMT)
commitc4bd5138d0bf189a8885db19ab0fa25dcbd1d6ae (patch)
treedbfb20cd3241db04be31166516f1fd654b037ad1
parent98d2b28642df4cc6d46b4353b5fb3097728fc7a6 (diff)
Added breadcrumb to PF page
-rw-r--r--print.css13
-rw-r--r--print.module10
-rw-r--r--print.tpl.php3
3 files changed, 19 insertions, 7 deletions
diff --git a/print.css b/print.css
index e696974..1378427 100644
--- a/print.css
+++ b/print.css
@@ -1,4 +1,4 @@
-body {margin: 1em;background-color: #fff;}
+body {margin:1em;background-color:#fff;font-family:sans-serif}
th {text-align: left;color: #006;border-bottom: 1px solid #ccc;}
tr.odd {background-color: #ddd;}
tr.even {background-color: #fff;}
@@ -11,16 +11,17 @@ a:visited {color: #000;}
a:hover {color: #00f}
a:link img, a:visited img {border:0}
-.print-footnote {font-size:small;}
+.print-footnote {font-size:xx-small;}
.print-logo {border:0;}
.print-site_name {}
-.print-title {font-size:200%;font-weight: bold;margin:0.67em 0 0.67em 0}
-.print-submitted {}
-.print-created {}
+.print-breadcrumb {font-size:x-small}
+.print-title {font-size:200%;font-weight: bold;margin:0.67em 0 0.22em 0}
+.print-submitted {font-size:small}
+.print-created {font-size:small}
.print-taxonomy ul {margin:0;padding:0px;}
.print-taxonomy li {display:inline;}
.print-content {}
.print-hr {border:0;height:1px;width:100%;color:#9E9E9E;background-color:#9E9E9E;}
-.print-source_url {}
+.print-source_url {font-size:small;}
.print-links {font-size:small;}
.print-footer {text-align:center;}
diff --git a/print.module b/print.module
index b1c1bec..d40c37b 100644
--- a/print.module
+++ b/print.module
@@ -421,7 +421,6 @@ function _print_var_generator($node, $cid = NULL) {
$print["language"] = $GLOBALS['locale'];
$print["title"] = $node->title;
$print["robots_meta"] = _print_robots_meta_generator();
-// $print["base_href"] = "<base href=\"".$base_url."/node/".$node->nid."\" />\n";
$print["base_href"] = "<base href=\"". url("node/$node->nid", NULL, NULL, TRUE) ."\" />\n";
$print["head"] = drupal_get_html_head();
$print["scripts"] = drupal_get_js();
@@ -462,6 +461,15 @@ function _print_var_generator($node, $cid = NULL) {
$print["submitted"] = theme_get_setting("toggle_node_info_$node->type") ? $themed['by'] ." ". ($node->name ? $node->name : variable_get('anonymous', t('Anonymous'))) : "";
$print["created"] = theme_get_setting("toggle_node_info_$node->type") ? $themed['created'] ." ". format_date($node->created, 'small') : "";
+ menu_set_active_item("node/$node->nid");
+ $breadcrumb = drupal_get_breadcrumb();
+ if (!empty($breadcrumb)) {
+ $print["breadcrumb"] = implode(" > ", drupal_get_breadcrumb());
+ }
+ else {
+ $print["breadcrumb"] = "";
+ }
+
// Display the collected links at the bottom of the page. Code once taken from Kjartan Mannes' project.module
if (!empty($print_settings['urls'])) {
$urls = print_friendly_urls();
diff --git a/print.tpl.php b/print.tpl.php
index 827a29f..3fb9d8a 100644
--- a/print.tpl.php
+++ b/print.tpl.php
@@ -12,6 +12,9 @@
<body<?php print $print["sendtoprinter"] ?>>
<div><?php print $print["logo"] ?></div>
<div class="print-site_name"><?php print $print["site_name"] ?></div>
+ <p />
+ <div class="print-breadcrumb"><?php print $print["breadcrumb"] ?></div>
+ <hr class="print-hr" />
<div class="print-title"><?php print $print["title"] ?></div>
<div class="print-submitted"><?php print $print["submitted"] ?></div>
<div class="print-created"><?php print $print["created"] ?></div>