1<?php global $conf, $lang, $ACT, $INFO, $ID, $DOKU_BASE, $INPUT ?> 2 3<div id="pageheader"> 4 <!-- Messages --> 5 <div id="msgarea"> 6 <?php html_msgarea() ?> 7 </div> 8 9 <div style="display:flex;align-items:center"> 10 <!-- Breadcrumbs --> 11 <div class="breadcrumbs"> 12 <?php if (tpl_getConf("dokuwikibreadcrumbs_enable")) { ?> 13 <?php if($conf['youarehere']): ?> 14 <div class="youarehere"><?php tpl_youarehere() ?></div> 15 <?php endif ?> 16 <?php if($conf['breadcrumbs']): ?> 17 <div class="trace"><?php tpl_breadcrumbs() ?></div> 18 <?php endif ?> 19 <?php } else { ?> 20 <?php 21 $startpage = (tpl_getConf('startpage') ? tpl_getConf('startpage') : wl()); 22 if ("show" == $ACT && tpl_getConf("breadcrumbs_fullpath")) { 23 //build full path 24 $orgValue = $conf['youarehere']; 25 $conf['youarehere'] = true; 26 $youarehere = tpl_youarehere('» ', true); 27 $conf['youarehere'] = $orgValue; 28 29 //remove text youarehere 30 $youarehere = preg_replace('/.*?bchead.*?span>/', '', $youarehere); 31 32 //replace home 33 $youarehere = preg_replace('/.*?home.*?span>/', '<span class="home"><a href="'.$startpage.'">'.tpl_getlang("breadcrumbs_docs").'</a></span>', $youarehere); 34 35 //replace current page 36 $matches = array(); 37 preg_match_all('/<bdi>.*?<\/bdi>/', $youarehere, $matches); 38 39 $last = end($matches[0]); 40 if (false === $last) { 41 $youarehere .= '» <bdi>'.tpl_pagetitle(null, true).'</bdi>'; 42 } else { 43 $youarehere = str_replace($last, '<bdi>'.tpl_pagetitle(null, true).'</bdi>', $youarehere); 44 } 45 } else if ("showtag" == $ACT) { 46 $youarehere = '<span class="home"><a href="'.$startpage.'">'.tpl_getlang("breadcrumbs_docs").'</a></span>» <bdi>TAG: '.hsc(str_replace('_', ' ', $INPUT->str('tag'))).'</bdi>'; 47 } else if ("admin" == $ACT) { 48 $youarehere = '<span class="admin"><a href="'.wl($ID,array('do'=>'admin'),true,'&').'">'.tpl_getlang("breadcrumbs_admin").'</a></span>» <bdi>'.tpl_pagetitle(null, true).'</bdi>'; 49 } else { 50 // Set default breadcrums 51 $youarehere = '<span class="home"><a href="'.$startpage.'">'.tpl_getlang("breadcrumbs_docs").'</a></span>» <bdi>'.tpl_pagetitle(null, true).'</bdi>'; 52 } 53 54 echo $youarehere; 55 ?> 56 <?php } ?> 57 </div> 58 59 <!-- Edit this page --> 60 <?php if ($ACT == "show" && (isset($INFO["editable"]) && $INFO["editable"])) { ?> 61 <a style="margin-left:auto" href="<?php echo (new \dokuwiki\Menu\Item\Edit())->getLink(); ?>"> 62 <i class="fas fa-pencil-alt"></i> 63 <span> <?php echo tpl_getlang("pageheader_editthispage"); ?></span> 64 </a> 65 <?php } ?> 66 </div> 67 68 <?php tpl_includeFile('pageheader.html') ?> 69 70 <hr> 71</div> 72