navigation1Add my vote for this tag create new tag
, view all tags

Include Index Plugin

Generate an index of pages included from a master page


This plugin generates an index of all the pages included from one master page. This allows you to put together one huge document for print out plus a lean index for online browsing without extra maintenance.


Syntax Rules

%INCLUDEINDEX{"MasterPage" headers="n" format="string"}%

This discards everything from the included page, except:

  1. Headlines up to given level, the default is 4.
  2. %INLCUDEd pages, shown as defined by the format string. Default is "   * ", i.e. a bullet list.

The format string accepts the same syntax as a FormattedSearch. Use this to extract reports about your included pages. E.g. create a table of current revision information for all sub documents of a bigger manual:

%INCLUDEINDEX("MyProjectManual" headers="0" format="|[[$page]] |$rev |$author |$date |"}%

Include Strategy

In theory, you can continue to write your pages as always and glue some of them to a bigger document via %INCLUDE%.

In practice, you might want to change your strategy a bit, to make it easier to re-use pages as building blocks for large docs. The following rules proved useful in bigger projects:

  1. Don't put headlines into the topic pages, i.e.:
  2. Concentrate headlines + includes in one master page
  3. Title this according to your print-out needs
  4. Create one index page using this plug-in, add links useful for online surfing, editorial hints etc.
  5. Use TWiki:Main.ColasNahaboos savemulti Checkpoint function to save the master document without lengthy rendering
  6. For really huge documents, where you want to print parts/chapters:
    1. create master page per printable chapter
    2. include master pages in global print page
    3. %INCLUDEINDEXes of master pages in index page

You write:

MyProject: MyProjectManual: Topic pages:
---+ My project

---++ See also:

  1. <a href=/cgi-bin/edit/MyProjectManual>edit structure</a>
  2. <a href=/cgi-bin/pdf/MyProjectManual>Print PDF</a>
---+ Foo Topic 1

---++ Bar Topic 2

---++ Three...

---+ Bar Topic X

Lorem ipsum dolet
Lorem ipsum dolet
Lorem ipsum dolet

You get:


  1. Foo Topic1
    1. Bar Topic2
    2. Three...
  2. Bar Topic X

See also:

  1. Edit structure
  2. Print PDF


Foo Topic 1

Lorem ipsum dolet

Foo Topic 2

Lorem ipsum dolet


Lorem ipsum dolet

Bar Topic X

Lorem ipsum dolet
Lorem ipsum dolet
Lorem ipsum dolet
Lorem ipsum dolet

Compare to SectionalEditPlugin

The TWiki:Plugins.SectionalEditPlugin addresses the same problem with a completely different approach: It keeps one (possibly huge) wiki page for your printed document. The wiki way is emulated by opening small sections for editing.

Advantages of IncludeIndexPlugin:

  • You can reference the sub-topics as plain wiki pages
  • People can edit the sub-topics independently
  • WebChanges etc. work as expected.
  • Revision history of sub-documents is easy to track
  • Need to render full document only when saving the master doc, but not for sub-topics

Advantages of SectionalEditPlugin:

  • More topics mean more names, mean more possibilities to screw up namespace
  • Sometimes, it is more convenient to edit many topics in one go
  • TWiki (shame!) doesn't support Wiki:WayBackMode (yet), It is very hard to get a previous version of a composite doc other than storing printouts

IncludeIndexPlugin Global Settings

  • There are no global settings necessary for this plugin, except
    • Set SHORTDESCRIPTION = Generate an index of pages included from a master page
    • Set DEBUG = 0

Plugin Installation Instructions

Note: You do not need to install anything on the browser to use this plugin. The following instructions are for the administrator who installs the plugin on the server where TWiki is running.

  • Download the ZIP file from the Plugin web (see below)
  • Unzip IncludeIndexPlugin.zip in your twiki installation directory. Content:
    File: Description:
    data/TWiki/IncludeIndexPlugin.txt Plugin topic
    lib/TWiki/Plugins/IncludeIndexPlugin.pm Plugin Perl module
  • Visit configure in your TWiki installation, and enable the plugin in the {Plugins} section.
  • Test if the plugin is correctly installed: Between the following two horizontal rulers, the list of topics in the TWikiDocumentation should show up:

%INCLUDEINDEX{"TWikiDocumentation" format=" 0 $topic"}%

Plugin Info

Plugin Author: TWiki:Main.PeterKlausner
Copyright: © 2002-2003 TWiki:Main.PeterKlausner
© 2005-2010 TWiki:TWiki.TWikiContributor
License: GPL (GNU General Public License)
Plugin Version: V1.1
Change History:  
2010-12-14: TWikibug:Item6530: Doc improvements, changing TWIKIWEB to SYSTEMWEB -- TWiki:Main.PeterThoeny
Apr 2003: Posted for Feb2003 release
Jul 2002: Initial version for Dec2001 release
CPAN Dependencies: none
Other Dependencies: none
Perl Version: 5.005
Plugin Home: http://TWiki.org/cgi-bin/view/Plugins/IncludeIndexPlugin
Feedback: http://TWiki.org/cgi-bin/view/Plugins/IncludeIndexPluginDev

Related Topics: TWikiPreferences, TWikiPlugins, TWiki:Plugins.SectionalEditPlugin, TWiki:Plugins.PdfPlugin

IIUC, this is talking about a master Table of Contents, not an index. (Does anybody really call it an index?) Most other places within TWiki, this is called a Table of Contents, is it not? As a long term goal, it would be nice to use consistent terminology! At the very least, include things like "Table of Contents", TOC, and "Master Table of Contents" for searchability.

-- RandyKramer - 2010-12-15

Topic attachments
I Attachment History Action Size Date Who Comment
Unknown file formatmd5 IncludeIndexPlugin.md5 r3 r2 r1 manage 0.2 K 2010-12-15 - 04:35 PeterThoeny  
Compressed Zip archivetgz IncludeIndexPlugin.tgz r3 r2 r1 manage 6.0 K 2010-12-15 - 04:35 PeterThoeny  
Compressed Zip archivezip IncludeIndexPlugin.zip r4 r3 r2 r1 manage 7.5 K 2010-12-15 - 04:35 PeterThoeny  
Unknown file formatEXT IncludeIndexPlugin_installer r2 r1 manage 3.4 K 2010-12-15 - 04:35 PeterThoeny  
Edit | Attach | Watch | Print version | History: r11 < r10 < r9 < r8 < r7 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r11 - 2013-10-16 - PeterThoeny
  • Learn about TWiki  
  • Download TWiki
This site is powered by the TWiki collaboration platform Powered by Perl Hosted by OICcam.com Ideas, requests, problems regarding TWiki? Send feedback. Ask community in the support forum.
Copyright © 1999-2018 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.