Table of contents
    No headers

    This concept was first created and documented by craigsivils.  This is simply a revision that I made to make it a little easier to manage.  I also added class="table" to the <table> tag to have it inherit the correct table CSS form the skin (doesn't work in wiki.developer.mindtouch.com but will work in all other Fiesta skins).  Any and all suggestions, improvements etc are welcome.  Thanks again to craigsivils for starting this awesome DekiScript app.

     

    <h1>Simple Forum</h1>
    <p>{{wiki.create("Create New Topic",page.path,"AjaxThreadedComments",true,"Put Your Title Here")}}</p>
    <table init="var topics = page.subpages;" block="let topics = list.sort(map.values(topics), _, true, 'date.compare($left.date, $right.date)');" class="table" style="font-size: 12px;">
        <tbody>
            <tr>
                <th valign="top" style="width: 70%;">Topic/Starter</th>
                <th valign="top" style="width: 15%;">Last Post</th>
                <th valign="top" style="width: 7%;">#Views</th>
                <th valign="top" style="width: 7%;">#Replies</th>
            </tr>
            <tr class="{{__count % 2 == 0 ? 'bg1' : 'bg2'}}" foreach="var t in topics">
                <td init="var revxml = web.xml(t.api..'/revisions?revision=1');"><span style="font-size: 17px; font-weight: bold;">{{web.link(t.uri,t.title)}}</span><br />
                {{var u = wiki.getuser(xml.text(revxml, 'user.author/username'));web.link(u.uri,u.name);}}</td>
                <td>{{t.date}}<br />
                by {{web.link(page.author.uri,page.author.name)}}</td>
                <td>{{t.viewcount}}</td>
                <td>{{#t.comments}}</td>
            </tr>
        </tbody>
    </table>
    
    

    Topic/Starter Last Post #Views #Replies
    Put Your Title Here
    Object reference not set to an instance of an object (click for details)
    Tue, 07 Dec 2010 19:53:54 GMT
    by Petrus4
    126 0
    What Color would be the best for the south wall?
    Object reference not set to an instance of an object (click for details)
    Fri, 27 Mar 2009 20:46:02 GMT
    by Petrus4
    484 0
    What is your favorite bread recipe?
    Object reference not set to an instance of an object (click for details)
    Fri, 27 Mar 2009 20:08:29 GMT
    by Petrus4
    390 0

     

    Tag page
    You must login to post a comment.

    Copyright © 2011 MindTouch, Inc. Powered by