UnderlayPages is an idea of FujioNobori and implemented by ThomasWaldmann in moin--main--1.3--patch-133 (so beat TW if it doesn't work).

The basic idea is to have an additional page directory, lets call it underlay/, to the already existing data/ directory. The structure below is the same, but underlay/ only uses the pages/ subdirectory.

Let's assume we copied all pages from moinmaster to this underlay/ directory and start a wiki with empty data/pages/ directory.

As long as there is no page in data/ covering a page in underlay/, you will see the underlay/ page, like looking through data/ onto underlay/.

So there is a complete set of system and help pages visible (all of them are in underlay/).

We can add pages to the wiki as usual, they will be stored in data/ and do not mix with the stuff in underlay/.

There is only one exception: if we go to FrontPage (e.g.), we will see the underlay/ page. We can even edit the underlay/ page, but on save it will be automatically copied to the data/ directory (including everything in the page dir, so attachments, backups and logs will all be there), there will be no change in the underlay/ dir.

Page.getPageList() will simply give all pages in data/ and additionally also the pages in underlay/ (if they are not already on the list).

The underlay directory is configured by cfg.data_underlay_dir - so you could either use a wiki local directory or a global directory for a wiki farm or even a data/ directory of another wiki.

Basically, this gives moin copy-on-write (COW) semantics. All existing pages in the underlay/ directory are visible, with any writes going to the normal directory.

Shall we change the setup instructions (and mv wiki/data wiki/underlay in dist archive) to use underlay directory feature in default installation? Would be much easier for upgrades.

state131.tdraw

state131p2.tdraw

MoinMoin: UnderlayPages (last edited 2007-10-29 19:08:48 by localhost)