How to select multiple dexterity elements of one type in one dexterity element of another type in Plone 5.1

You should use plonecli to make the add-on. It is possible to make the add-on manually (but don't do that)

When you use plonecli to make a (browser) view, it will make TWO files by default: view.py and template.pt. In view.py you add the code to get the related contents and you call this from template.pt:

SO, in view.py you have something like:

 def getRelations(self): 
      // find all backlinks
     return 'the result I found'

And in template.pt

<tal:related tal:repeat="related_stuff view/getRelations">

    ${related_stuff/Title}
    //other fields, image, description maybe

</tal:related>
1 Like

Professionally solved by Espen on GitHub - espenmn/acentoweb.mediaflows

Thanks!