Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
dokuwiki:server [2024/06/10 15:38] – [Customization] Bernard Condraudokuwiki:server [2024/06/11 09:37] (current) – [Customization] Bernard Condrau
Line 50: Line 50:
   - ...and replace at the end line ''act_dispatch();'' with<file>init_lang($langcode);   - ...and replace at the end line ''act_dispatch();'' with<file>init_lang($langcode);
 bethico_dispatch(basename(__FILE__));</file> bethico_dispatch(basename(__FILE__));</file>
 +  - Add a line to file ''/lib/scripts/page.js'' in function ''makeToggle'' to allow the template to set the table of contents to //open// or //closed//<file>$handle[0].setState = function(state){
 +            var hidden;
 +        --> if(!state && JSINFO.toc) state = JSINFO.toc.initial_state;
 +            if(!state) state = 1;</file>
  
 === Fix toc handling in core === === Fix toc handling in core ===
-  - Modify ''/inc/template.php'' and add in function ''tpl_toc'' before line ''Event::createAndTrigger('TPL_TOC_RENDER', $toc, null, false);'':<file>if (@include_once(template('dispatcher.php'))) bethico_update_toc($toc, $TOC);</file>This is a non-destructive change which fixes an issue in the table of contents if plugin:condition is installed.+  - Modify ''/inc/template.php'' in function ''tpl_toc'' add before line ''Event::createAndTrigger('TPL_TOC_RENDER', $toc, null, false);'':<file>if (@include_once(template('dispatcher.php'))) bethico_update_toc($toc, $TOC);</file>This is a non-destructive change which fixes an issue in the table of contents if plugin:condition is installed.
  
 === Fix toc handling in plugin:toctweak === === Fix toc handling in plugin:toctweak ===
 +  - Make elements of items array unique at the end of function ''_toc'' in file ''lib/plugins/toctweak/helper.php''<file>$items = array_unique($items, SORT_REGULAR);</file>
  
 === Install === === Install ===