Forum OpenACS Development: Rendering content created in xowiki

A few months back we created a little application that used the xowiki package for page creation and rendering of content chunks and we are in the process of updating the application to work with the newest version of XoWiki and xotcl-core (which is proving quite challenging).

We got the content chunk creation portion to work again, and almost have the chunk display working how we want it using the include format Gustaf specified in a recent post: <include src="/packages/xowiki/lib/view" url="/xowiki/en/index">. The problem is that it is not just rendering the content but injecting all the xowiki page control elements (e.g. the wikicmds toolbar) and xowiki css which overrides our package styles.

What is the best way to call content chunks from xowiki without all the fluff?

Collapse
Posted by Gustaf Neumann on
get an update of xowiki from cvs head, and use

<include src="/packages/xowiki/lib/view" url="/xowiki/" template_file="view-plain">

at the place where you are including the xowiki pages. This will get rid of the command bar.

concerning the styles: i am not sure this is desired. some pages will look strange when they are included without the appropriate css definitions (e.g. the default index page). However, i have just added a flag for the include to do so:

<include src="/packages/xowiki/lib/view" url="/xowiki/" template_file="view-plain" css="none">

does this help?
-gustaf neumann

Collapse
Posted by Carl Robert Blesius on
Hi Gustaf,

Thank you, this helps, but when using two different includes on the same request returns the content of whatever "include" came first in both cases. If we use the alternative option (using an item_id instead of a URL) it works fine, although it ignores the template part. Is this a problem with ::xowiki::Package instantiate?

Carl

P.S. Thanks for adding the css=none option. We need it to remain flexible on display. Will test that later.

Collapse
Posted by Gustaf Neumann on
got it. there was some unwanted caching if some other package did multiple includes of different pages from the same xowiki package. It is committed as usual to cvs HEAD

-gustaf