SourceForge.net Logo
May 7, 2006
© GPL
 
ProWikiCenter
Changeable Side Bar
 
For multiple different SideBars in your wiki, compared to EditableSideBar, you need to provide the name of the SideBar page before the page is inserted. This needs a second pass for the TemplateInsert process.

(1) wiki.cfg

The wiki.cfg file must contain at least:

  • TemplateInsertPassList=PreInsert;Insert
The placement in wiki.cfg is a must because it is sensible information that is protected from change.

(2) TemplateFile

The TemplateFile needs to contain (this also gives a proper default of "SideBar" if the variable SideBarName is empty):

{Insert:page.{PreInsert:SideBarName;SideBar}}

(3) Configuration in Context pages

Any Context can now redefine:

  • SideBarName=SecondSideBar
and have the Branch show a specific SideBar.

Notes

There was no special programming necessary to support this, it is just a clever combination of primitive operations: insert a variable name, insert a page, define and redefine variables.

All names are arbitrary but it is a good idea to stick with these suggestions.

If you need post-procession of script output to the template use a third PostInsert pass.

Define passes only if you need them because they add an - although small - overhead to wiki page rendering.


FolderWikiFeatures FolderLayout