<$mt:SubFolderRecurse$>
Recursively call the <mt:SubFolders> or <mt:TopLevelFolders> container with the subfolders of the folder in context. This tag, when placed at the end of loop controlled by one of the tags above will cause them to recursively descend into any subfolders that exist during the loop.
Because folders are essentially categories for pages, most of the mtml category tags also work for folders.
Attributes ¶
max_depth(optional) - Specifies the maximum number of times the system should recurse. Default: infinite depth.
Examples ¶
Create recursive list of folders/subfolders, linking those with pages to the respective folder archive page.
<mt:TopLevelFolders> <mt:SubCatIsFirst><ul></mt:SubCatIsFirst> <mt:If tag="FolderCount"> <li><h3><a href="<$mt:CategoryArchiveLink$>" <mt:Ignore>NOTE: there is no "folder" equivalent of this category-specific tag.</mt:Ignore> title="<$mt:FolderDescription$>"><mt:FolderLabel></a> (<$mt:FolderCount$>)</h3> <mt:Else> <li><h3><$mt:FolderLabel$> (<$mt:FolderCount$>)</h3> </mt:If> <$mt:SubFolderRecurse$> </li> <mt:SubCatIsLast></ul></mt:SubCatIsLast> </mt:TopLevelFolders>Or more simply:
<mt:TopLevelFolders> <$mt:FolderLabel$> <$mt:SubFolderRecurse$> </mt:TopLevelFolders>List pages in each folder, recursively. This will take a while to publish if you have many categories and pages.
<mt:TopLevelFolders> <mt:SubCatIsFirst><ul></mt:SubCatIsFirst> <mt:If tag="FolderCount"> <li><h3><a href="<$mt:CategoryArchiveLink$>" title="<$mt:FolderDescription$>"><mt:FolderLabel></a> (<$mt:FolderCount$>)</h3> <mt:Else> <li><h3><$mt:FolderLabel$> (<$mt:FolderCount$>)</h3> </mt:If> <mt:Pages> <mt:If name="__first__"><ul></mt:If> <li><a href="<$mt:PagePermalink$>"><$mt:PageTitle$></a></li> <mt:If name="__last__"></ul></mt:If> </mt:Pages> <$mt:SubFolderRecurse$> </li> <mt:SubCatIsLast></ul></mt:SubCatIsLast> </mt:TopLevelFolders>

Gautam Patel
December 16, 2007 1:02 AM | Reply
See the Wiki Cookbook Template Tag recipes - Breadcrumbs for more.
Beau Smith
replied to comment from Gautam Patel
May 22, 2009 1:55 PM | Reply
I've updated docs for the
<$mt:SubFolderRecurse$>tag with tested examples, they were horribly wrong.