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 if ("show" == $ACT && tpl_getConf("breadcrumbs_fullpath")) { 22 //build full path 23 $orgValue = $conf['youarehere']; 24 $conf['youarehere'] = true; 25 $youarehere = tpl_youarehere('» ', true); 26 $conf['youarehere'] = $orgValue; 27 28 //remove text youarehere 29 $youarehere = preg_replace('/.*?bchead.*?span>/', '', $youarehere); 30 31 //replace home 32 $youarehere = preg_replace('/.*?home.*?span>/', '<span class="home"><a href="'.tpl_getConf('startpage').'">'.tpl_getlang("breadcrumbs_docs").'</a></span>', $youarehere); 33 34 //replace current page 35 $matches = array(); 36 preg_match_all('/<bdi>.*?<\/bdi>/', $youarehere, $matches); 37 38 $last = end($matches[0]); 39 if (false === $last) { 40 $youarehere .= '» <bdi>'.tpl_pagetitle(null, true).'</bdi>'; 41 } else { 42 $youarehere = str_replace($last, '<bdi>'.tpl_pagetitle(null, true).'</bdi>', $youarehere); 43 } 44 } else if ("showtag" == $ACT) { 45 $youarehere = '<span class="home"><a href="'.tpl_getConf('startpage').'">'.tpl_getlang("breadcrumbs_docs").'</a></span>» <bdi>TAG: '.hsc(str_replace('_', ' ', $INPUT->str('tag'))).'</bdi>'; 46 } else if ("admin" == $ACT) { 47 $youarehere = '<span class="admin"><a href="'.wl($ID,array('do'=>'admin'),true,'&').'">'.tpl_getlang("breadcrumbs_admin").'</a></span>» <bdi>'.tpl_pagetitle(null, true).'</bdi>'; 48 } else { 49 // Set default breadcrums 50 $youarehere = '<span class="home"><a href="'.tpl_getConf('startpage').'">'.tpl_getlang("breadcrumbs_docs").'</a></span>» <bdi>'.tpl_pagetitle(null, true).'</bdi>'; 51 } 52 53 echo $youarehere; 54 ?> 55 <?php } ?> 56 </div> 57 58 <!-- Edit this page --> 59 <?php if ($ACT == "show" && (isset($INFO["editable"]) && $INFO["editable"])) { ?> 60 <a style="margin-left:auto" href="<?php echo (new \dokuwiki\Menu\Item\Edit())->getLink(); ?>"> 61 <i class="fas fa-pencil-alt"></i> 62 <span> <?php echo tpl_getlang("pageheader_editthispage"); ?></span> 63 </a> 64 <?php } ?> 65 </div> 66 67 <?php tpl_includeFile('pageheader.html') ?> 68 69 <hr> 70</div> 71