[opencms-dev] CmsCategoryService : readCategoryResourcesand recursivity

Sandrine Prousteau s.prousteau at eurelis.com
Thu Dec 30 13:03:36 CET 2010


Ok I chosed method 2.
Thanks for your answer.

-----Message d'origine-----
De : opencms-dev-bounces at opencms.org [mailto:opencms-dev-bounces at opencms.org] De la part de Paul-Inge Flakstad
Envoyé : mercredi 29 décembre 2010 18:49
À : The OpenCms mailing list
Objet : Re: [opencms-dev] CmsCategoryService : readCategoryResourcesand recursivity

Hi Sandrine,

I can't give you any solution, unfortunately, but I can tell you that I've experienced the same problem.

If I remember correctly, I've approached the problem in two ways:
1: Having "parents" and "children" as separate categories (not actually parents and children)
2: Fetching resources from both parent and children categories, and then separating children from their parent manually

It seems to me that the API is still somewhat immature (it's a relatively new feature in OpenCms), especially when dealing with this parents/children scenario. What little I've worked with categories, I've had to do a lot of "manual processing".

Best regards,
Paul
________________________________________
Fra: opencms-dev-bounces at opencms.org [opencms-dev-bounces at opencms.org] på vegne av Sandrine Prousteau [s.prousteau at eurelis.com]
Sendt: 29. desember 2010 11:06
Til: The OpenCms mailing list
Emne: [opencms-dev] CmsCategoryService : readCategoryResources and      recursivity

Hi

I'd like to use CmsCategoryService function readCategoryResources. I have to list in one side resources assigned only to the parent category, and in another side resources assigned to the parent category and all its children. So I used the attribute 'recursive', but I don't have the behavior expected:

If a ressource is assigned to a chidren category, it appear in the list of resources assigned only to the parent category... And we cannot assigned a resource to a children category whithout assigning it to the parent category...

What is this recursive attribute for?

Must I list all resources, and then remove resources from lists of all subcategories?


_______________________________________________
This mail is sent to you from the opencms-dev mailing list
To change your list options, or to unsubscribe from the list, please visit
http://lists.opencms.org/mailman/listinfo/opencms-dev



More information about the opencms-dev mailing list