Forum OpenACS Development: Re: xowiki prototypes

Collapse
4: Re: xowiki prototypes (response to 1)
Posted by Gustaf Neumann on
Åsmund was describing, what xowiki's import is doing. The same is essentially used in the section "Import and Export of XoWiki Pages" in http://media.wu-wien.ac.at/download/xowiki-doc/,
where pages are generated to be imported into xowiki via the admin pages. Import/export is a tool quite useful for mass import or creating pages from a program.

The intention of the xowiki prototypes is different. XOWiki prototypes are an instrument, where one can ship an xowiki installation with predefined pages, which are instantiated on demand for every instance. See for example the predefined index page /packages/xowiki/www/prototypes/index.page. This page is the default index page for every xowiki instance. During the first request, this page is loaded and added as all other xowiki pages into the content repository, where it can be edited etc. One can for example delete the index page from the xowiki menu bar, and on the next request, it is regenerated from the prototype. The same happens e.g. as well for the weblog /packages/xowiki/www/prototypes/weblog.page. Or one can provide "CGI-like" pages (pages containing executable code, see e.g. the samples in /packages/xowiki/www/prototypes/)

The prototype can be easily tailored for every xowiki installation by simply editing this file. It is as well straight forward to add new other pages in the same format.

My initial understanding was that executing one of these
pieces of code (from the DS shell, for example) would
create a page and I would see it on the lists. I have
tried that without success.

the prototypes are not executed from the developer shell, they are created on demand. Make a new xowiki instance, got to admin/list; you will see no weblog page. now type in the URL yourinstance/weblog, and go back to admin/list... now all parts of the weblog are created...

hope, this helps.

-gustaf neumann