I have two content types. 1. Lecture 2. Notes
Notes have an entity reference field which references lecture. Different users create different notes each referencing to a lecture.
Now, How do I display note created by user on lectures page.
I know how to do it with Views and Panels modules. First you need to create two Views:
(Content) Content: Nid
Now you should go to Lecture view and in Advanced menu, click on theme information link, and you need to create template file, find row with
Field Content: Nid and create one of suggested fields, something like
(views-view-field--conversations--page--nid-1.tpl.php) in /sites/all/themes/YOURTHEMENAME/views/YOURVIEWNAME(lecture_view--block)/YOURTEMPLATEFILE(views-view-field--conversations--page--nid-1.tpl.php) in this file you will past code from theme view, its something similar to
<?php print render($output); ?>
you need to add one more thing embed that views:
<?php print views_embed_view('notes', $display_id='default', $row->nid); ?>
your contextual filter should work, and now you can add this view to your Panel to display, in Panel menu.
Maybe this is not the best way to do this