[opencms-dev] CategoryWidget

Jordi Martí jmarti at theinit.com
Tue Apr 24 00:18:29 CEST 2012


Hi all !!

I used opencms 6.2 in the past, and now I'm hooking back to opencms 8. 
There are lots of improvements, congratulations!

I'm trying to implement a property that is based on database backed data 
("category" style).

I've checked there is a CategoryWidget that reads from /_categories/ 
folder, and shows categories.

I'm thinking of two options:

(1) - Use CategoryWidget and synchronize "_categories" folder when 
database changes occur, through CMS API.

  => About addressing it this way, main question is => If I have 
different categories (for example "customer type", or "Region"), how can 
I do that the widget only shows one category or the other depending on 
the element? I see there is no parameter to define the category I want 
to use. I could extend CategoryWidget to accept a new configuration 
parameter that would say which directory inside "_categories" I want to 
start on. Should it be done like that?

  => Another question would be how to handle the synchronization => I 
see that opencms still lacks a RESTful API, doesn't it? Are there any 
plans to do them? Until then, should I do a JSP to send category changes 
to the CMS repository, so it would write them as folders under 
"_categories"?

(2)  Implement my own CategoryWidget that makes database queries. => I 
think this second one is far more complex than I thought (looking at the 
CategoryWidget source code). Isn't there any code that already does 
this? For example, with a configuration parameter that would say the 
database query to do? (i'm asking too much...) xDDD

On the other side, one more question if I may: any plans on Spanish 
localization for opencms 8? How long would it take to start translating 
it myself? (more or less). Is anybody already doing it? (not to do it 
twice) XD

Too many questions :)  I must say that I miss some documentation on the 
new stuff of opencms8. The new ".content" folder or sitemap 
configuration is very new for me, and I can't find documentation about 
that. Neither about the new containerpages... I'm checking the template8 
examples, but I miss the documentation modules that opencms 6 had. Any 
idea on how I could easily learn the new ways of doing things in 
opencms8 ? :))

Thanks everybody !!

Jordi





More information about the opencms-dev mailing list