Documentation >> Macros >> WebOutline
Macro: #webOutline
The Web Outline macro is designed to provide a flexible means of displaying directory information for pages within the structure of a conversation. The Web Outline macro always takes a "path" attribute, pointing to a folder in the conversation, as defined in the admin site's Structure Editor -- the macro will then return a formatted list of pages in the specified folder. The list returned can be extensively customized, using the parameters documented below.
<!--#webOutline path="[path]"-->
Required attributes
- path="[path to folder]" : The path to the folder you wish to outline. For the root folder of the conversation, use path="". For a subfolder named "Docs", use path="/docs/".
Optional attributes
- Outline content
- depth="[number]" (Default: 1) : The number of level deep to follow subfolders when rendering. The default "1" will only show the files in the folder specified. A value of "2" would show also show one additional level of subfolders and their contents, etc.
- limit="[number]" (Default: no limit) : The max number of items to display. Can be used, for example, to show only the last X number of files added to a folder, if pages are named sequentially.
- showRoot="true/false" (Default: false) : Include the folder specified. This will include a version of the folderTemplate rendering for the folder in the "path" attribute.
- sortOrder="[File Name, Page Title, Nav Title]" : (Default: folder's sort order as defined in the Structure Editor) : The order to sort the pages in the outline.
- sortDescending="true/false" (Default: "Sort Descending" property of the folder, as defined in the Structure Editor) : Whether to sort the list in reverse order.
- Templates
Using the attributes below, you may specify templates defined in the admin site's Template Editor for use in rendering the outline's contents. These templates support Page Macros for displaying attributes of a page.
- outlineTemplate="[template name]" (Default: "Web Outline READONLY") : This is the outer template for the outline. Use this template to create an HTML table around the outline, or other framing. Use the special macro "<--#outline-->" to place the body of the outline in this template.
- folderTemplate="[template name]" (Default: "Folder Outline READONLY") : Determines the appearance of folders rendered in the outline. This is a wrapper for the file contents of the folder...use the special macro "<--#files-->" to place the folder's file contents in the template. Also supports the macro "<--#pageIndentation-->" which inserts a repeated value ( specified with the "indent" attribute ) for indenting levels of the outline.
- fileTemplate="[template name]" (Default: "File Outline READONLY") : The fileTemplate is repeated for each file in a folder within the outline. Also supports the macro "<--#pageIndentation-->" which inserts a repeated value ( specified with the "indent" attribute ) for indenting levels of the outline.
- indent="[string]" (Default: " ") : String to repeat and return in the file and folder template's "<--#pageIndentation-->" macro.
- Cache controls
In order to improve performance, Web outline macro results are cached, which means that when the macro is used, the results are stored for a period of time, and those pre-rendered results returned on user requests. It's highly recommended that you leaving caching enabled on all weboutlines, but in cases where you have an outline that changes often, you may wish to reduce the number of hours the cache is valid using the "maxage" attribute to force updates. Note that due to caching, a new page created in the outlined folder may not appear in the outline immediately. NOTE: Three different versions will be cached, for admins, members, and guests, as necessary.
- cache="true/false" (Default: true) : Allow the weboutline rendering to be cached.
- maxage="[number of hours]" (Default: 24) : number of hours a cached version of the weboutline is valid.
Performance Hints
The speed at which the Web Outline macro follows directly from the number of items in the outline, and the complexity of the templates used -- and the level of caching allowed. If you find you create a Web Outline that seems to render slowly, try simplifying the templates, or reducing the depth of nested folders displayed.
View in DG
|