support the tplinc plugin

This is a first commit to generally support the plugin and make the page
footer use it. More includes should be added at other places.
This commit is contained in:
Andreas Gohr 2017-03-28 16:55:26 +02:00
commit cad2e67442
2 changed files with 40 additions and 16 deletions

View file

@ -9,14 +9,13 @@
* @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
*/
use dokuwiki\template\sprintdoc\Template;
if (!defined('DOKU_INC')) die(); /* must be run from within DokuWiki */
header('X-UA-Compatible: IE=edge,chrome=1');
$showTools = !tpl_getConf('hideTools') || ( tpl_getConf('hideTools') && !empty($_SERVER['REMOTE_USER']) );
$showSidebar = true; /* */
$hasFooter = page_findnearest('pagefooter');
$showFooter = $hasFooter && ($ACT === 'show');
?>
<html class="edge no-js" lang="<?php echo $conf['lang'] ?>" dir="<?php echo $lang['direction'] ?>">
<head>
@ -277,19 +276,13 @@ $classWideContent = ($ACT === "show") ? "": "wide-content ";
tpl_content(false); /* the main content */
?>
<div class="clearer"></div>
<?php if($showFooter):
/* + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + */
/* Page Include Hook: pagefooter.txt */
/* + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + */
?>
<div class="wikipagefooter">
<hr>
<?php tpl_include_page('pagefooter', true, true) ?>
<div class="clearer"></div>
</div>
<?php endif; ?>
<?php
if($ACT == 'show') echo Template::getInstance()->getInclude(
'footer',
'<div class="wikipagefooter"><hr>',
'<div class="clearer"></div></div>'
);
?>
</div><!-- .main-content -->