From 28088fe9fe46bcb8557383978dfec683b015bae9 Mon Sep 17 00:00:00 2001 From: Robert Sesek Date: Sat, 1 Apr 2006 05:49:55 +0000 Subject: [PATCH] Adding toplink stuff --- printer_navigation.php | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) diff --git a/printer_navigation.php b/printer_navigation.php index 2d398f8..0cfe891 100644 --- a/printer_navigation.php +++ b/printer_navigation.php @@ -49,6 +49,20 @@ class Printer_Navigation */ var $registry = null; + /** + * Global links that are used for admin home, logout, etc. + * @var array + * @access private + */ + var $toplinks = array(); + + /** + * Navigational structure + * @var array + * @access private + */ + var $structure = array(); + // ################################################################### /** * Constructor @@ -67,6 +81,20 @@ class Printer_Navigation $this->__construct($registry); } + // ################################################################### + /** + * Adds a global link to the array; these cannot be removed once added + * + * @access public + * + * @param string Link text + * @param string HREF of the URL + */ + function add_top_link($text, $href) + { + $this->toplinks["$href"] = $text; + } + // ################################################################### /** * Generates the header HTML that is called in ISSO.Printer->page_start() @@ -78,6 +106,16 @@ class Printer_Navigation */ function generate_header_html() { + $output = '' . "\n\n"; + + $output2 = array(); + foreach ($this->toplinks AS $href => $text) + { + $output2[] = '' . $text . ''; + } + + $output .= implode(' • ', $output2); + return $output; } } -- 2.43.5