Template:MostRecentlyUpdatedPages

    Table of contents
    No headers
    /***
        USAGE:
    
            MostRecentlyUpdatedPages()
                show top 10 most recently updated sub-pages of the current page.
    
            MostRecentlyUpdatedPages(PAGES)
                show top 10 most recently updated pages from the PAGES list.
    
            MostRecentlyUpdatedPages(PAGES, LIMIT)
                show top LIMIT most recently updated pages from the PAGES list.
    ***/
    
    var pages = $0 ?? $pages ?? page.subpages;
    var limit = $1 ?? $limit ?? 10;
    
    if(#pages) {
        <font size="-1">
            <ol>
                foreach(var p in list.sort(map.values(pages), _, true, "date.compare($left.date, $right.date)") where __count < limit) {
                    <li>web.link(p.uri, p.title)</li>
                }
            </ol>
        </font>
    }
    

     

    Tag page
    You must login to post a comment.

    Copyright © 2011 MindTouch, Inc. Powered by