+ $nav_info = nav_info($a);
+
+ /*
+ * Build the page
+ */
+
+ $tpl = get_markup_template('nav.tpl');
+
+ $a->page['nav'] .= replace_macros($tpl, array(
+ '$baseurl' => App::get_baseurl(),
+ '$sitelocation' => $nav_info['sitelocation'],
+ '$nav' => $nav_info['nav'],
+ '$banner' => $nav_info['banner'],
+ '$emptynotifications' => t('Nothing new here'),
+ '$userinfo' => $nav_info['userinfo'],
+ '$sel' => $a->nav_sel,
+ '$apps' => $a->apps,
+ '$clear_notifs' => t('Clear notifications'),
+ '$search_hint' => t('@name, !forum, #tags, content')
+ ));
+
+ call_hooks('page_header', $a->page['nav']);
+}
+
+/**
+ * @brief Prepares a list of navigation links
+ *
+ * @param App $a
+ * @return array Navigation links
+ * string 'sitelocation' => The webbie (username@site.com)
+ * array 'nav' => Array of links used in the nav menu
+ * string 'banner' => Formatted html link with banner image
+ * array 'userinfo' => Array of user information (name, icon)
+ */
+function nav_info(App $a)
+{
+ $ssl_state = ((local_user()) ? true : false);
+
+ /*
+ * Our network is distributed, and as you visit friends some of the