summaryrefslogtreecommitdiff
path: root/includes/common.inc
diff options
context:
space:
mode:
Diffstat (limited to 'includes/common.inc')
-rw-r--r--includes/common.inc49
1 files changed, 49 insertions, 0 deletions
diff --git a/includes/common.inc b/includes/common.inc
index 2a67db247..aaa95276c 100644
--- a/includes/common.inc
+++ b/includes/common.inc
@@ -2,6 +2,55 @@
// $Id$
/**
+ * Functions to get and set the title of the current page.
+ */
+function drupal_set_title($title = NULL) {
+ static $stored_title;
+
+ if (isset($title)) {
+ $stored_title = $title;
+ }
+ return $stored_title;
+}
+
+function drupal_get_title() {
+ $title = drupal_set_title();
+
+ if (!isset($title)) {
+ $title = menu_get_active_title();
+ }
+
+ return $title;
+}
+
+
+/**
+ * Functions to get and set the breadcrumb trail of the current page. The
+ * breadcrumb trail is represented as an array of links, starting with
+ * "home" and proceeding up to but not including the current page.
+ */
+function drupal_set_breadcrumb($breadcrumb = NULL) {
+ static $stored_breadcrumb;
+
+ if (isset($breadcrumb)) {
+ $stored_breadcrumb = $breadcrumb;
+ }
+ return $stored_breadcrumb;
+}
+
+function drupal_get_breadcrumb() {
+ $breadcrumb = drupal_set_breadcrumb();
+
+ if (!isset($breadcrumb)) {
+ $breadcrumb = menu_get_active_breadcrumb();
+ array_pop($breadcrumb);
+ }
+
+ return $breadcrumb;
+}
+
+
+/**
* Build the alias/path array
*/
function drupal_get_path_map($action = "") {