Not a developer? Go to MovableType.com

Documentation

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.

<mt:TopLevelFolders>
    <mt:FolderLabel>
    <mt:SubFolderRecurse>
</mt:TopLevelFolders>

Because folders are essentially categories for pages, most of the Category tags also work for folders.

Attributes

max_depth

Specifies the maximum number of times the system should recurse. Default is infinite depth.

Examples

Create recursive list of folders/subfolders, linking those with pages to the respective directory.

Note: Because folders don’t have archive templates, there is no <mt:FolderArchiveLink> because there is no guarantee that a page with the basename of index exists in the folder. Thus linking to the folder must be created manually using <mt:BlogURL><mt:FolderPath>/.

<mt:TopLevelFolders>
    <mt:SubCatIsFirst><ul></mt:SubCatIsFirst>
        <mt:If tag="FolderCount">
            <li><h3><a href="<$mt:BlogURL$><$mt:FolderPath$>/"
            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>

Same as above example but now listing pages in each folder, recursively.

<mt:TopLevelFolders>
    <mt:SubCatIsFirst><ul></mt:SubCatIsFirst>
        <mt:If tag="FolderCount">
            <li><h3><a href="<$mt:BlogURL$><$mt:FolderPath$>/"
            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>
Back