0

I am creating a website that has a content type called “School” which will hold names and details of schools. I also have a entity type called “courses”, which holds the names of courses that the schools run and the details of them. As many of the schools run the same course, I want to create the courses as entities and then reference them through the schools content type.

There are two ways to create a course:

I create a school and then create a course through inline entity reference form on the content type. This creates a one way reference from the school to that course. I can create a course at the entity then reference the school from that - good if I have one course that references many schools (/admin/structure/entity-type/school_objects/courses/add)

If I create a view I can show all courses on the node. Which is fine. But any school added to a course through the entity, that doesn’t show on the node edit page. Only the courses added whilst editing a node show there. This is confusing for a content editor when they open the node, as it looks like there are less courses then there actually is at that school.

How do I make it so that whichever way I create a course, that these all show on the node edit form? Or is there another way to do this?

Example: this school has 4 courses as we can see in this view. But only the ones added via the node edit form show there, not the ones created at the entity level which added the schools to them. enter image description here enter image description here

  • It is clear you are referencing Courses through a Field on School nodes. But it isn't clear how you reference Schools from Courses when they're created independently. Is this a separate reference field? Do you have Allow users to add existing nodes. enabled on your reference field Manage form display? Did you integrate your Course entity to be used in Inline entity form (read in the module README)? – prkos Sep 24 '18 at 20:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.