Information from related module

I have the next problem : i have 2 custom modules - School groups and Teachers. The relationship of these modules is many-to-many. So when i go to detail view of some school group i choose in subpanel the teacher(s) of this group. But i also need to see this information about teachers in some field of group card in detail view and listview. How can i do it? I’ve read about logic hooks and some method changing views/view.details,php, but it turned out that custom modules don’t have this folder. I’m confused and need to do it as soon as possible. Heeeeeeelp me please!
I tried to do it as written here, but it didn’t work :frowning: