Forum OpenACS Development: Re: localization for category trees fixed

Collapse
Posted by Malte Sussdorff on
on the risk of sounding utterly stupid, where should I add the switch? I looked at your recent commit and saw that you prepared the -locale switch, but I did not find a suiteable location to put it in categories.tcl. Or did you forget to commit the two?

As for the beer: Yeah, sure, let's meet in Budapest or Vienna in the new year!

Collapse
Posted by Gustaf Neumann on
the implementation is for the newer style of includes, where one can write in a wiki page e.g.


    bla bla
    {{categories -locale default+system}}
    ...

The applicable options can be found under "-parameter" in xowiki-portlet-procs. In yesterdays code, I have not simplified the usage of the new-style xowiki portlets for the cases, where some adp-file includes the portlet (such as oacs-view.adp).

For this purpose, i have added yet another two-liner named include to CVS, such one can now quite simply all kind of new-style xowiki portlets with the same syntax as inside of an xowiki page between the double curly braces.

In essence, one can write now in the code of the oacs-view

<DIV ..>
<include src="/packages/xowiki/www/portlets/include"
    &__including_page=page
    portlet="categories -locale default+system -open_page \@name\@ -decoration plain">
<hr>
<include src="/packages/xowiki/www/portlets/include"
    &__including_page=page
    portlet="categories -open_page \@name\@ -decoration plain">
</DIV>

where you get now the categories twice, once with new 2-language entries, and then with the default (now filtering on locale)

Collapse
Posted by Malte Sussdorff on
Ah. Thanks a lot for the explanation. Will try this out. Sadly the code you posted with the include gives me the error message:

[23/Dec/2006:15:18:55][12028.163848][-conn:3-] Notice: --including_page= page, portlet=categories -locale default -open_page @name@ -decoration plain
[23/Dec/2006:15:18:55][12028.163848][-conn:3-] Error: Error in include template "/web/cognovis/packages/xowiki/www/portlets/include": invalid command name "page"
invalid command name "page"

Collapse
Posted by Gustaf Neumann on
are you telling me, that the provided oacs-view.adp does not work? i have doubts. Can it be, that you forgot the ampersand in your include page?
Collapse
Posted by Malte Sussdorff on
No, I was even more stupid. I added "no_tree_name = 1" instead of saying "-no_tree_name 1". This did the trick.
Collapse
Posted by Malte Sussdorff on
Just to let you know that I tried it out with the include in the xowiki page itself (your first method) and it worked out beautifully. Thank you so much for this great work.