Add recursive loop to support tree-like structures
[tedtools.git] / data / template.tmpl
index 95e0060..7a2db76 100644 (file)
@@ -58,9 +58,8 @@ str ? "yes" : -1 = <% str ? "yes" : -1 %>
        <@ENDIF@>
 <@ENDIF@>
 
-
 <@ LOOP outerLoop @>
-       <% __COUNTER %>/<% __SIZE %>. odd:<% __ODD %> even:<% __EVEN %> <# <@if __FIRST @>FIRST<@endif@> <@if __LAST @>LAST<@endif@> id: <% ^ID %> <% DATA1 %>:<% DATA2 # "Data is absent" %>/<% DATA1 %> #>
+       <% __COUNTER %>/<% __SIZE %>. odd:<% __ODD %> even:<% __EVEN %>
        
        <& data/template_include.tmpl &>
        <@ LOOP innerLoop @>
@@ -69,3 +68,10 @@ str ? "yes" : -1 = <% str ? "yes" : -1 %>
                <@ IF __LAST @></ol><@ ENDIF @>
        <@ ENDLOOP @>
 <@ ENDLOOP @>
+
+<@ LOOP selfLoop@>
+       <@if __FIRST @><ul><@endif@><li><% __COUNTER %> <% NODE %>#<% CNT %>
+       <@ SELF @>
+       <@ LOOP oneloop@><@if __FIRST @><ol><@endif@><li><% __COUNTER %> oneloop:<% NODE %>#<% CNT %><@if __LAST @></ol><@endif@><@ ENDLOOP @>
+       <@if __LAST @></ul><@endif@>
+<@ ENDLOOP @>