cobe I am maintaining a Dokuwiki, after upgrade, the page switch function doesn't work anymore, as my investigation, the switch happens between below two pages which are located in the template folder(lib/tpl) 1. main.php (which has sidebar), which defined a switch link for switching to main-oh.php <div id="ohMode" class="minibar"><a href="switch.php?oh=true">OH Mode</a></div> 2. main-oh.php (which doesn't have sidebar), which defines another switch link for switching back to main.php <div id="NavMode" class="minibar"><a href="switch.php?oh=false">Navigation Mode</a></div> The content of switch.php is as below: <?php if (isset($_GET['oh'])) { setcookie("oh", $_GET['oh']); Header("Location: " . $_SERVER['HTTP_REFERER']); } else { die("Something went wrong."); } ?> I can't find the place to read cookie and switch page in php pages of self-defined template, so i guess it might be related the inner function of dokuwiki, does anybody know that? Expecting your replies! Thanks a lot!
cobe Luckily i find the right page for loading template page inc/actions.php if ($_COOKIE['oh'] != "true") { include(template('main.php')); } else { include(template('main-oh.php')); } It's resolved.
ach Does that code simply switch to a different template? If yes, have a look at the LoadSkin plugin to see how to solve that in a more standard way.