Forum OpenACS Development: Re: Small enhancements proposal for xowiki

Collapse
Posted by Antonio Pisano on
Ok, i gave a look to the code: actually categories includelet can show more than one category at a time if you pass a tree_name like "MyTree1 MyTree2". If you don't pass any tree_name, all mapped trees are shown.

I thought this includelet could show only one tree at a time! Now the presence of a separated "title" parameter makes sense. One could call it "Menu" for instance and let categories be shown, with tree name localized properly.

So far, so good. I then tried to understand how I could avoid to specify the locale to the includelet. I'd like it to understand that if it has been placed on a page in english, it should use the english locale.

In the code I couldn't find a way for the includelet to refer to the locale of its including page... I can use [ad_conn locale] or [::xo::cc locale], but this will return my language, not the one of the page... any suggestion?

Collapse
Posted by Antonio Pisano on
Figured it out: reference to including page is not so misteriously into class variable __including_page.

I could make it so one can avoid specifying the locale.

To cover the use case of "one tree per includelet", I have also added this modification: if includelet contains only one tree and no title was specified, use the name of the tree as title and activate "no_tree_name" parameter, so title doesn't get repeated 2 times.

Is it ok if I commit?