Forum OpenACS Development: Re: A small question about xowiki

Collapse
Posted by Gustaf Neumann on
well, xowiki passes the item-id to the template, but my guess is that you want to pass the item_id to the master template. This theory is as well based by you statemet that you just modified the adp-generator-procs, which are a small helper of mine to keep the various templates that a user can choose from in sync.

What did you change? Did you add <property name="object_id">@item_id@</property>?

Collapse
Posted by Claudio Pasolini on
I added <if @item_id@ not nil> <property name="displayed_object_id">@item_id@</property> </if>

I also modified index.vhu querying cr_items to get item_id given it:$page_name and I would to know the better way to get it.

Collapse
Posted by Gustaf Neumann on
why did you modify index.vuh?
Collapse
Posted by Claudio Pasolini on
Never mind, not being familiar with xotcl I wrongly supposed that I should find out the item_id corresponding to the page received by index.vhu, whereas item_id is magically set somewhere and I can simply reference it in the view-default.adp.
Collapse
Posted by Gustaf Neumann on
I was just wondering about the intention.

About the "magic": xowiki offers a higher flexibility for using template files compared to other packages. Furthermore, while most packages on OpenACS use purely function-based templates (e.g. "edit"), xowiki uses an object oriented resolution based on objects and methods (the template for "edit" for different pages or types of pages can be different).

The methods responsible for rendering are defined in xowiki-www-procs.tcl. The method for viewing pages is the method "view". xowiki does not pass blindly global variables to the template, but names explicitly all variables passed to the templates (see the invocation of the method "return_page"). This is done actually to to reduce the level of magic. For every method you find there all variables that ones can depend on in the template file.

I will add the passing of the property as you suggested to xowiki. Do you have an example, where we can the included "portlet" you are mentioning in action?

Collapse
Posted by Claudio Pasolini on
I'm preparing a demo at the temporary url http://www.oasisoftware.com:8004/ that you can visit as user: guest@abcd.com and password: guest

From there when you view an object, i.e. a news, a faq, a xowiki page, a forum, you get an includelet that enables you to tag, rate, categorize the object.

I have taken the idea and most of the code from the cop-base and cop-ui packages.

If you enter the community 'Sistema organizzativo' you can also view an example of the tags presented as a tag cloud.

Collapse
Posted by Gustaf Neumann on
I have committed the change the added adp property to cvs head, maybe someone else finds this useful.

The tag-cloud looks nice, but there seems to be in this installation a problem with pagination:
http://www.oasisoftware.com:8004/tags/tagged-items?tag=Xowiki&object_type=%3a%3axowiki%3a%3aPage&return_url=%2fdotlrn%2fclubs%2facme%2fone-community%3fpage_num%3d0

-gustaf neumann

Collapse
Posted by Claudio Pasolini on
Thank you for the commit and for pointing out the pagination error.

It occurs only when you filter the documents with ::xowiki::Page. Apparently the double colons disturb the pagination procs.

Being in a hurry I corrected my local version replacing the :: with __ in my query and now it works, but I think that the problem lies in the paginator.