I suppose you can do that with getresources using its tvfilters property
[[getresources?... &tvFilters=`financing_organization==[[*Financing organizations]]`]]
discuss.answer
The only way resources are related in MODX is by parent/child relations in the resource tree. If you can make the resources children of the Financing Organization pages, it gets very easy, though I can see why that might not be possible if there's a many-to-many relationship between projects and financing organizations. In that case, the best solution would be a custom DB table where each record lists the resource ID of a project page and the resource ID of an associated financing organization. This would mean developing a custom infrastructure to manage the table and produce the output. It's probably not worth it unless the site has a very large number of projects and financing organizations.
The TV thing will work, but it may be somewhat slow. If there is a resource field you're not using (introtext, description, longtitle, menutitle, link_attributes, etc.) you could put the list there and use the &where property of getResources to grab the pages you want, but be careful about the length of each field.
-
☆ A M B ☆
- 3,141 Posts
Tagger could be an alternative solution that I think is better suited to do filtering like the one you're doing because it has a dedicated data model, whereas TVs are not optimised for filtering.
Thank you all for the help!
Because I was searching the most simple way possible I manage to do this with the BobRay's solution.