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:
- Headlines up to given level, the default is 4.
- %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:
- Don't put headlines into the topic pages, i.e.:
- Concentrate headlines + includes in one master page
- Title this according to your print-out needs
- Create one index page using this plug-in, add links useful for online surfing, editorial hints etc.
- Use TWiki:Main.ColasNahaboos savemulti Checkpoint function to save the master document without lengthy rendering
- For really huge documents, where you want to print parts/chapters:
- create master page per printable chapter
- include master pages in global print page
- %INCLUDEINDEXes of master pages in index page
You write:
| MyProject: |
MyProjectManual: |
Topic pages: |
---+ My project
%INCLUDEINDEX{...
---++ See also:
- <a href=/twiki/bin/edit/MyProjectManual>edit structure</a>
- <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:
- Foo Topic1
- Bar Topic2
- Three...
- Bar Topic X
See also:
- Edit structure
- 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 |
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
__Related Topics:__
Sectional Edit Plugin,
Pdf Plugin?,
T Wiki Preferences,
T Wiki Plugins