Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /**
- * Hierarchical breadcrumbs
- *
- * This code was suggested as replacement for the usual breadcrumbs.
- * It only makes sense with a deep site structure.
- *
- * @author Andreas Gohr <andi@splitbrain.org>
- * @author Nigel McNie <oracle.shinoda@gmail.com>
- * @author Sean Coates <sean@caedmon.net>
- * @author <fredrik@averpil.com>
- * @todo May behave strangely in RTL languages
- *
- * @param string $sep Separator between entries
- * @return bool
- */
- function tpl_youarehere($sep = ' ยป ') {
- global $conf;
- global $ID;
- global $lang;
- // check if enabled
- if(!$conf['youarehere']) return false;
- $parts = explode(':', $ID);
- $count = count($parts);
- echo '<span class="bchead">'.$lang['youarehere'].' </span>';
- // always print the startpage
- echo '<span class="home">';
- /* tpl_pagelink(':'.$conf['start']); */
- /* tpl_pagelink(':'.$conf['baseurl']); */
- echo '<a href=http://lamp.dev:8080/dokuwiki/>home</a>';
- echo '</span>';
- // print intermediate namespace links
- $part = '';
- for($i = 0; $i < $count - 1; $i++) {
- $part .= $parts[$i].':';
- $page = $part;
- if($page == $conf['start']) continue; // Skip startpage
- // output
- echo $sep;
- tpl_pagelink($page);
- }
- // print current page, skipping start page, skipping for namespace index
- resolve_pageid('', $page, $exists);
- if(isset($page) && $page == $part.$parts[$i]) return true;
- $page = $part.$parts[$i];
- if($page == $conf['start']) return true;
- echo $sep;
- tpl_pagelink($page);
- return true;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement