Forum OpenACS Q&A: How to generate the category tree in xowiki

Hi,

This must be silly, but how do I generate/display the category tree in xowiki, I check the xowiki admin page, there are no link to display the category tree. Also how do I add content to different catergory. say one topic for music, one topic for programming, with different sub topic and contents.

I like the look of http://openac.org/xowiki, how can I do the same.

Thanks for your help .

Collapse
Posted by Dave Bauer on
See the api-doc browser https://openacs.org/api-doc/content-page-view?path=packages%2Fxowiki%2Fwww%2Foacs-view3.adp&version_id=434751&source_p=1
You can view any content page from there.

On OpenACS.org we have modified the page to include some additional CSS and Javascript as well as added an include for the category tree.

We also added a div around the content.

<div style="float:left; padding-right: 10px; border: solid 1px black; padding: 5px; margin: 5px; margin-right: 20px; font-size: .8em;width: 25%;">
<include src="/packages/xowiki/www/portlets/categories" &__including_page=page name="@title@" open_page="@name@">
</div><div style="float:right; width: 70%;">
@content;noquote@
</div>
Collapse
Posted by Gustaf Neumann on
Damon, if you create a page with the following content,

{{adp portlets/categories { name {Category Tree} }}

it will contain the Category Tree. In http://media.wu-wien.ac.at/download/xowiki-doc/index.html you will find various differnt displays, of the category tree (see as well the weblog).

with the block-markers you can out it at various places
of the page

>left-col<<
{{adp portlets/categories { name {Category Tree} }}
><<
>right-col<<
hello world
><<

If you create a page of type pageTemplate, and add there

>left-col<<
{{adp portlets/categories { name {Category Tree} }}
><<
>right-col<<
@page_content@
><<

and you create later a page of the type pageInstance, you can provide only the content of the page.

... and certainly, one can create a custorm view.adp page,
as Dave did.

on xowiki/admin you can create, administer and map the category tree. when you edit an xowiki page, the form will let you categorizing the page...

Collapse
Posted by Gustaf Neumann on
The newer version of xowiki can be configured to use an alternate view.adp page, to get a default view like on oacs.org (see dave's posting above). just now, i committed an alternate view.adp template named oacs-view.adp, which can be activated by adding

set template_file oacs-view

to the directory object.

Collapse
Posted by Stan Kaufman on
Dave sez:

On OpenACS.org we have modified the page to include some additional CSS and Javascript as well as added an include for the category tree.

We also added a div around the content.

It doesn't appear that xowiki in cvs has an openacs-org branch. Did your mods for xowiki on openacs.org not make it into cvs? Any chance you could put this version somewhere where we can access it? I'm trying to figure out how the package works, and seeing how you've modified it for openacs.org would help a great deal. Thanks!

Collapse
Posted by Dave Bauer on
Stan its pretty simple change in the ADP

https://openacs.org/api-doc/package-view?version%5fid=434751&public%5fp=1&kind=content

All the pages are in the api browser. I think I linked to the actual page in this thread.

Collapse
Posted by Gustaf Neumann on
stan, it does not have an oacs-branch, everything is in oacs-head. get the version, mount it, edit the directory object and add the entry as indicated, and you are done. the modified page looks afterwards like in http://demo.viscousmedia.com/oacs-mentorship/home/pages/en/index
(notice the shadow). This way, one can have the view templated configured per xowiki instance.

oacs.org apparently does not use the new version, it simply replaces the view template with a tailored version. this is certainly a possibility, but you are on your own tracking changes, all xowiki instances will have the same view template.