[%-# render one level of toc and call recursively itself if there are # nested levels. # expected args: # subs - an array with keys indentical to 'toc' from above. -%] [%- FOREACH sec = subs -%]