sidebar: Re-enable this standard functionality

This means if a sidebar file exists in a namespace or parent namespace
it will be rendered alongside the document.
Way good for index cutouts or workflows
This commit is contained in:
Andy Williams 2017-10-24 13:10:22 +01:00
parent dbdc46c71a
commit e1bb41cd92
2 changed files with 27 additions and 0 deletions

View File

@ -90,6 +90,16 @@ h1, h2, h3, h4, h5, h6,
}
}
#dokuwiki__aside {
float: right;
position: relative;
background-color: #282828;
padding-left: 10px;
padding-right: 10px;
margin-right: 15px;
min-width: 250px;
}
@media screen and (max-width: 768px) {
table.columns-plugin {
border: none;

View File

@ -18,6 +18,9 @@ $showTools = !tpl_getConf('hideTools') || ( tpl_getConf('hideTools') && $_SERVER
# this affects our grid layout later ( see 'if ($showTOC)' )
$showTOC = ($ACT == "show") && tpl_toc(true);
$hasSidebar = page_findnearest($conf['sidebar']);
$showSidebar = $hasSidebar && ($ACT=='show');
?><!DOCTYPE html>
<html lang="<?php echo $conf['lang'] ?>" dir="<?php echo $lang['direction'] ?>">
<head>
@ -94,6 +97,20 @@ $showTOC = ($ACT == "show") && tpl_toc(true);
<?php } else { ?>
<div class="col-md-11" id="dokuwiki__content">
<?php } ?>
<?php if($showSidebar): ?>
<!-- ********** ASIDE ********** -->
<div id="dokuwiki__aside" class="bs-sidebar"><div class="nav pad aside include group">
<h3 class="toggle">Navigation</h3>
<div class="content">
<?php tpl_flush() ?>
<?php tpl_includeFile('sidebarheader.html') ?>
<?php tpl_include_page($conf['sidebar'], true, true) ?>
<?php tpl_includeFile('sidebarfooter.html') ?>
</div>
</div></div><!-- /aside -->
<?php endif; ?>
<div class="page">
<?php tpl_flush(); ?>
<?php tpl_content(false); ?>