/**
  * Build the breadcrumbs.
  *
  * @return  string
  */
 public function build()
 {
     $format = array();
     $pieces = explode('/', $this->category);
     $pieces[] = $this->page;
     $temp = array();
     foreach ($pieces as $item) {
         if (empty($item)) {
             continue;
         }
         $temp[] = $item;
         $checkForName = ltrim(implode('/', $temp), '/');
         $format[] = \App\findName($checkForName);
     }
     $ret = '<a href="' . \App\getBaseUrl() . '">' . BD_NAME . '</a>';
     if (sizeof($format) == 1) {
         return $ret . $this->separator . $format['0'];
     } else {
         return $ret . $this->separator . implode($this->separator, $format);
     }
 }
Example #2
0
 /**
  * Changes that apply to all possible templates.
  */
 private function getDefaultChanges()
 {
     $base = \App\getBaseUrl();
     return array('assets' => $base . '/app/views/' . BD_THEME . '/assets', 'wiki_name' => BD_NAME, 'wiki_theme' => BD_THEME, 'wiki_base_url' => $base, 'branding_color' => BD_BRANDING_COLOR, 'page' => $this->page, 'category' => $this->category, 'currentLanguage' => \App\getLanguage(), 'languages' => $this->buildLanguages(), 'query' => '', 'navigation' => $this->structure->getHtml());
 }