Not logged in. · Lost password · Register

All posts by jsarzik (2)

topic: tpl_toc(true) ("TOC" does not work when older document is displayed)  in the forum: General Help and Support Templates and Layout
Avatar
jsarzik #1
Member since Aug 2019 · 2 posts
Group memberships: Members
Show profile · Link to this post
Yes, moving the call to tpl_content () before tpl_toc () works.

Thank you.
topic: tpl_toc(true) ("TOC" does not work when older document is displayed)  in the forum: General Help and Support Templates and Layout
Avatar
jsarzik #2
Member since Aug 2019 · 2 posts
Group memberships: Members
Show profile · Link to this post
Subject: tpl_toc(true)
I've modified my template below. TOC is functional as long as I'm on the normal detail page. However, once I view an older version of the page, TOC is not working.

Why is it caused?


<?php
/**
 * Template header, included in the main and detail files
 */

// must be run from within DokuWiki
if (!defined('DOKU_INC')) die();

global $EVENT_HANDLER, $ACT, $ID, $INFO, $lang, $conf;

$toc = tpl_toc(true);
?>

<div class="layout-col layout-col--2">
    <?php if(!empty($toc)): ?>
    <div class="layout-col_item layout-col_item--toc">
        <?php echo $toc; ?>
    </div>
    <?php endif; ?>
    <div class="layout-col_item layout-col_item--max layout-col_item--detail">
        <?php tpl_content(false); ?>
    </div>
</div>
Close Smaller – Larger + Reply to this post:
Special characters:
Special queries
Go to forum
Imprint
This board is powered by the Unclassified NewsBoard software, 20150713-dev, © 2003-2015 by Yves Goergen
Current time: 2020-02-17, 08:13:19 (UTC +01:00)