/** * get the path bar for this anchor * * This function is used to build a path bar relative to the anchor. * For example, if you are displaying an article related to a category, * the path bar has to mention the category. You can use following code * to do that: * [php] * $anchor = Anchors::get($article['anchor']); * $context['path_bar'] = array_merge($context['path_bar'], $anchor->get_path_bar()); * [/php] * * @return an array of $url => $label, or NULL on error * * @see shared/anchor.php */ function get_path_bar() { // no item bound if (!isset($this->item['id'])) { return NULL; } // standard path $path = Anchor::get_path_bar(); // add categories root if (!$this->item['anchor']) { $path = array_merge(array('categories/' => i18n::s('Categories')), $path); } return $path; }