Hi All,
I am working on a dotCMS project where we are writing HTML, Javascript and Velocity - but no Java (there has been no need yet).
In dotCMS, I need to traverse two relationships to come up with a list of all items of Structure C related to an instance Structure A where Structure A relates to Structure C which relates to Structure D. Fine, I have done this and have a list of content that I can iterate through: http://pastebin.com/52uStcUA.
The problem is that I need to paginate this list and the #pageContent() macro only accepts a query, not a list. I looked into the source of the #pageContent() macro in dotCMS_library.vm and found that it calls to Java: ContentsWebAPI.pageContent() - which in turn only accepts a query.
As far as I can see, this leaves me with two options:
1) Somehow phrase a query for the #pageContent() macro that expresses traversal of a transitive relationship. I know how to write a query for one relationship (http://pastebin.com/cwLY0Av4) but not two.
2) Write my own Java implementation of ContentsWebAPI.pageContent(), which frankly sounds like overkill (and perhaps just the first step down a long and painful road).
So, any other ideas on how to solve this? Any feedback would be appreciated!
Rob :)