Search:
Template:Look and Feel > Template:TableOfContents

Template:TableOfContents

    Table of contents
    No headers
    /***
        USAGE:
    
        TableOfContents()
            Show a table of contents for the sections in an article
    ***/
    
    // Redirect to custom page, if any
    var template_custom = wiki.inclusions(true)[-1].path .. 'Custom';
    if (wiki.pageexists(template_custom)) {
        return template(template_custom, $);
    }
    
    <div class="idf-toc">
    page.toc
    </div>
    
    .idf-toc div.wiki-toc {
      float: right;
      background: #fff;
      border: 1px solid #ccc;
      padding: 0px 0px 10px 10px;
      width: 250px;
    }
    
    // replace existing toc with new
    $(function(){ 
        $('#pagetoc').remove();
        $('.idf-toc').attr('id', 'pagetoc');
    })
    

    Files (0)

     

    Comments (0)

    You must login to post a comment.