$COURSE = $this->page->course;
// Required for legacy template uses
- $navigation = $this->has_navbar();
+ $navigation = $this->page->has_navbar();
ob_start();
include($templatefile);
$course = $this->page->course;
$performanceinfo = self::PERFORMANCE_INFO_TOKEN;
- $navigation = $this->has_navbar();
+ $navigation = $this->page->has_navbar();
if (!$menu && $navigation) {
$menu = $loggedinas;
}
public function navbar() {
return $this->page->navbar->content();
}
-
- /**
- * Checks to see if there are any items on the navbar object
- * @return bool true if there are, false if not
- */
- public function has_navbar() {
- return $this->page->navbar->has_items();
}
-}
/// RENDERERS
return $this->_navbar;
}
+ /**
+ * Checks to see if there are any items on the navbar object
+ * @return bool true if there are, false if not
+ */
+ public function has_navbar() {
+ if ($this->_navbar === null) {
+ $this->_navbar = new navbar($this);
+ }
+ return $this->_navbar->has_items();
+ }
+
/**
* Returns the settings navigation object
* @return settings_navigation
</div>
<?php } ?>
-<?php if ($OUTPUT->has_navbar()) { // This is the navigation bar with breadcrumbs ?>
+<?php if ($PAGE->has_navbar()) { // This is the navigation bar with breadcrumbs ?>
<div class="navbar clearfix">
<div class="breadcrumb"><?php echo $OUTPUT->navbar(); ?></div>
<div class="navbutton"><?php echo $PAGE->button; ?></div>
</div>
<?php } ?>
-<?php if ($OUTPUT->has_navbar()) { // This is the navigation bar with breadcrumbs ?>
+<?php if ($PAGE->has_navbar()) { // This is the navigation bar with breadcrumbs ?>
<div class="navbar clearfix">
<div class="breadcrumb"><?php echo $OUTPUT->navbar(); ?></div>
<div class="navbutton"><?php echo $PAGE->button; ?></div>
</div>
<?php } ?>
-<?php if ($OUTPUT->has_navbar()) { // This is the navigation bar with breadcrumbs ?>
+<?php if ($PAGE->has_navbar()) { // This is the navigation bar with breadcrumbs ?>
<div class="navbar clearfix">
<div class="breadcrumb"><?php echo $OUTPUT->navbar(); ?></div>
<div class="navbutton"><?php echo $PAGE->button; ?></div>