Vincent, I'd say you have pin-pointed exactly what you need to do to make this happen: within get_related_resources() get the image path for each resource, and pass that to the frontend to be placed in the related resource graph.
A long time ago we did some work on the FPAN project which would accomplish the most complex part of this (getting the image path) the result of that work is in a pull request which has languished for a long time https://github.com/archesproject/arches/pull/2845. The idea was to make a method on the Resource() class to which a node name would be passed, and the corresponding tile values for that resource's nodes would be returned. We only needed to develop it to handle concepts and strings at the time, so we have it in use here: https://github.com/legiongis/arches/blob/fpan_master/arches/app/models/resource.py#L343. I see many many uses for a function like that (like yours), and just have not been able to pick the PR up since we did the initial attempts at getting it updated per the Farallon team's request. As for the node name, your quickest option would be to a make a new entry in settings.py that would join a resource model with the name of its node that holds the image you want, but a more robust way would be something like incorporating this into the system settings graph, etc. Good luck! Adam On Mon, Sep 17, 2018 at 10:11 AM, Vincent Meijer <meijer.vinc...@gmail.com> wrote: > I am trying to display additional information in the Related Resources > section of a report. > More specifically: if the related resource type has a node > 'thumbnail_image', I want to display this. > > But how do I get this information? > > I already found that the information is gathered in the frontend over > here: > https://github.com/archesproject/arches/blob/ > a6100830bc6628b365aa1bee9a26723828bf3099/arches/app/media/ > js/models/report.js#L123-L132 > > Now I need to find out where in the backend this information is coming > from. > I am currently looking in views/resources.py and models/resources.py. > I figured the data is queried in resource.get_related_resources() in > models/resources.py, and that the desired properties are appended in > views/resources.py here: > https://github.com/archesproject/arches/blob/ > a6100830bc6628b365aa1bee9a26723828bf3099/arches/app/views/ > resource.py#L542-L543 > > It seems my question is twofold: > - Do I need to specify specific graph nodes in > resource.get_related_resources() > in order to send them to the frontend? > - and if so, how? Also: how do find the name of the specific node I'm > after? > > > Thanks! > Vincent > > -- > -- To post, send email to archesproject@googlegroups.com. To unsubscribe, > send email to archesproject+unsubscr...@googlegroups.com. For more > information, visit https://groups.google.com/d/forum/archesproject?hl=en > --- > You received this message because you are subscribed to the Google Groups > "Arches Project" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to archesproject+unsubscr...@googlegroups.com. > For more options, visit https://groups.google.com/d/optout. > -- -- To post, send email to archesproject@googlegroups.com. To unsubscribe, send email to archesproject+unsubscr...@googlegroups.com. For more information, visit https://groups.google.com/d/forum/archesproject?hl=en --- You received this message because you are subscribed to the Google Groups "Arches Project" group. To unsubscribe from this group and stop receiving emails from it, send an email to archesproject+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.