key Log In or Register to edit

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.

Usage

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 Formatted Search. 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
%INCLUDEINDEX{...

---++ See also:

  1. <a href=/twiki/bin/edit/MyProjectManual>edit structure</a>
  2. <a href=/twiki/bin/pdf/MyProjectManual>Print PDF</a>
---+ Foo Topic 1
%INCLUDE{Topic1...

---++ Bar Topic 2
%INCLUDE{Topic2...

---++ Three...

---+ Bar Topic X
%INCLUDE{TopicX...

Lorem ipsum dolet
Lorem ipsum dolet
.
.
.
Lorem ipsum dolet

You get:

MyProject:

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

See also:

  1. Edit structure
  2. Print PDF

MyProjectManual

Foo Topic 1

Lorem ipsum dolet

Foo Topic 2

Lorem ipsum dolet

Three...

Lorem ipsum dolet

Bar Topic X

Lorem ipsum dolet
Lorem ipsum dolet
Lorem ipsum dolet
.
.
.
Lorem ipsum dolet

Compare to Sectional Edit Plugin

The Sectional Edit Plugin 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 Include Index Plugin:

  • You can reference the sub-topics as plain wiki pages
  • People can edit the sub-topics independently
  • Web Changes 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 Sectional Edit Plugin:
  • More topics mean more names, mean more possiblities 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
  • (Dakar) 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 T Wiki Documentation should show up:

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

Plugin Info

Plugin Author: TWiki:Main/PeterKlausner
Plugin Version: V1.000
Change History:  
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
Source: CVSPlugins:InlcudeIndexPlugin

__Related Topics:__
Sectional Edit Plugin, Pdf Plugin?, T Wiki Preferences, T Wiki Plugins

 
Ad Sponsor
Back to Redbourn
Copyright © We make no guarantee of the correctness of the content of this site. All material on this collaboration platform is the property of Martin Cleaver and the contributing authors.