[ Index ]

PHP Cross Reference of DokuWiki

title

Body

[close]

/lib/tpl/dokuwiki/ -> main.php (source)

   1  <?php
   2  /**
   3   * DokuWiki Default Template 2012
   4   *
   5   * @link     http://dokuwiki.org/template
   6   * @author   Anika Henke <anika@selfthinker.org>
   7   * @author   Clarence Lee <clarencedglee@gmail.com>
   8   * @license  GPL 2 (http://www.gnu.org/licenses/gpl.html)
   9   */
  10  
  11  if (!defined('DOKU_INC')) die(); /* must be run from within DokuWiki */
  12  
  13  $hasSidebar = page_findnearest($conf['sidebar']);
  14  $showSidebar = $hasSidebar && ($ACT=='show');
  15  ?><!DOCTYPE html>
  16  <html lang="<?php echo $conf['lang'] ?>" dir="<?php echo $lang['direction'] ?>" class="no-js">
  17  <head>
  18      <meta charset="utf-8" />
  19      <title><?php tpl_pagetitle() ?> [<?php echo strip_tags($conf['title']) ?>]</title>
  20      <script>(function(H){H.className=H.className.replace(/\bno-js\b/,'js')})(document.documentElement)</script>
  21      <?php tpl_metaheaders() ?>
  22      <meta name="viewport" content="width=device-width,initial-scale=1" />
  23      <?php echo tpl_favicon(array('favicon', 'mobile')) ?>
  24      <?php tpl_includeFile('meta.html') ?>
  25  </head>
  26  
  27  <body>
  28      <div id="dokuwiki__site"><div id="dokuwiki__top" class="site <?php echo tpl_classes(); ?> <?php
  29          echo ($showSidebar) ? 'showSidebar' : ''; ?> <?php echo ($hasSidebar) ? 'hasSidebar' : ''; ?>">
  30  
  31          <?php include ('tpl_header.php') ?>
  32  
  33          <div class="wrapper group">
  34  
  35              <?php if($showSidebar): ?>
  36                  <!-- ********** ASIDE ********** -->
  37                  <div id="dokuwiki__aside"><div class="pad aside include group">
  38                      <h3 class="toggle"><?php echo $lang['sidebar'] ?></h3>
  39                      <div class="content"><div class="group">
  40                          <?php tpl_flush() ?>
  41                          <?php tpl_includeFile('sidebarheader.html') ?>
  42                          <?php tpl_include_page($conf['sidebar'], true, true) ?>
  43                          <?php tpl_includeFile('sidebarfooter.html') ?>
  44                      </div></div>
  45                  </div></div><!-- /aside -->
  46              <?php endif; ?>
  47  
  48              <!-- ********** CONTENT ********** -->
  49              <div id="dokuwiki__content"><div class="pad group">
  50                  <?php html_msgarea() ?>
  51  
  52                  <div class="pageId"><span><?php echo hsc($ID) ?></span></div>
  53  
  54                  <div class="page group">
  55                      <?php tpl_flush() ?>
  56                      <?php tpl_includeFile('pageheader.html') ?>
  57                      <!-- wikipage start -->
  58                      <?php tpl_content() ?>
  59                      <!-- wikipage stop -->
  60                      <?php tpl_includeFile('pagefooter.html') ?>
  61                  </div>
  62  
  63                  <div class="docInfo"><?php tpl_pageinfo() ?></div>
  64  
  65                  <?php tpl_flush() ?>
  66              </div></div><!-- /content -->
  67  
  68              <hr class="a11y" />
  69  
  70              <!-- PAGE ACTIONS -->
  71              <div id="dokuwiki__pagetools">
  72                  <h3 class="a11y"><?php echo $lang['page_tools']; ?></h3>
  73                  <div class="tools">
  74                      <ul>
  75                          <?php echo (new \dokuwiki\Menu\PageMenu())->getListItems(); ?>
  76                      </ul>
  77                  </div>
  78              </div>
  79          </div><!-- /wrapper -->
  80  
  81          <?php include ('tpl_footer.php') ?>
  82      </div></div><!-- /site -->
  83  
  84      <div class="no"><?php tpl_indexerWebBug() /* provide DokuWiki housekeeping, required in all templates */ ?></div>
  85      <div id="screen__mode" class="no"></div><?php /* helper to detect CSS media query in script.js */ ?>
  86  </body>
  87  </html>