[opencms-dev] CmsCategoryService : readCategoryResources and recursivity
Paul-Inge Flakstad
flakstad at npolar.no
Wed Dec 29 18:49:22 CET 2010
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?
More information about the opencms-dev
mailing list