@6>
<@local(ps,name,root,num,max_depth)>
<@>
<$name = argv#0>
<$root = argv#1>
<$ps = v.load_plgset(name)>
<$num= v.plugin_num(name)>
<$max_depth = (ps.depth || 3)-1>
<@>
<@>---------------------------------------------------------------------
<@>再帰サブルーチン
<@>---------------------------------------------------------------------
<$sub = begin.function>
<@local(t, p, node, tree, depth, x)>
<$node = argv#0>
<$tree = node.children>
<$depth = argv#1><@>prefix
<$p = "\t" %x depth>
<@p>
>
<@forexec(t, tree, begin.forexec)>
<$ifset(substr(t.elink_key,0,2) eq './', t.elink_key, substr(t.elink_key,2))>
<$ifnext(t.tstat & v.tstat_nomenu)>
<@ifexec(t.children && depth
<@p> - <@t.elink_key>")>"><@t.title>
<@exec(sub, t, depth+1)>
<@p>
<$else>
<@p> - <@\>
<@t.elink_key>")>"><@t.title>
<$end>
<$end.forexec>
<@p>
<$end.function>
<@>---------------------------------------------------------------------
<@> コンテンツリスト
<@>---------------------------------------------------------------------
<$tree = argv#1>
<@ifexec(root, begin)>
<@exec(sub, root, 0)>
<$end>