WIKI Page with TOC and Search

LabKey Support Forum (Inactive)
WIKI Page with TOC and Search adam  2014-06-19 13:37
Status: Closed
 
You can embed the Wiki Table Of Contents and Search webparts into any wiki (or message) that uses HTML format using our substitution syntax. As an example, create an HTML wiki with this source:

  ${labkey.webPart(partName='Wiki Table of Contents', showFrame='false')}
  ${labkey.webPart(partName='Wiki TOC', showFrame='false')}
  ${labkey.webPart(partName='Search', showFrame='false', location='right', includeSubFolders='false')}

https://www.labkey.org/wiki/home/Documentation/page.view?name=include

You can also use the LABKEY.WebPart() client API to dynamically AJAX webparts into an HTML page:

  <div id='tocDiv'/><br/>
  <div id='searchDiv'/>
  <script type="text/javascript">
    var tocRenderer = new LABKEY.WebPart({
        partName: 'Wiki TOC',
        renderTo: 'tocDiv'
        })
    tocRenderer .render();

    var tocRenderer = new LABKEY.WebPart({
        partName: 'Search',
        renderTo: 'searchDiv'
        })
    tocRenderer .render();
  </script>

https://www.labkey.org/download/clientapi_docs/javascript-api/symbols/LABKEY.WebPart.html

Adam