TOC html

From Redazione
Jump to navigation Jump to search
Line 56: Line 56:
  
 
$ci(function() {
 
$ci(function() {
 +
 +
 +
var wiki_list = []
 +
 +
 +
function walk_through_TOC(children,depth) {
 +
 +
if(!children || !Object.keys(children).length) {
 +
return
 +
}
 +
 +
for(var value of children) {
 +
 +
if(value.path) {
 +
pages_ordered.push('#'.repeat(depth) + '[[' + value.path + '|' + . value.text + ']]')
 +
}
 +
 +
 +
if(value.children) {
 +
walk_through_TOC(value.children,++depth);
 +
}
 +
 +
}
 +
}
 +
 +
  
 
var contents = $ci('#TOC_contents').val();
 
var contents = $ci('#TOC_contents').val();

Revision as of 09:11, 16 July 2020


tree placeholder