This forum has moved to a new location and is in read-only mode. Please visit talk.octobercms.com to access the new location.

dan12625
dan12625

I am trying to use output data that I have set up using the builder plugin through the Record Details component and running into some issues.

In my created plugin, Schools, I have Instructors (set up as a relation to an instructors plugin I created separately). It is possible to have more than one instructor, so they are store in the database as an array. Like so: [{"instructor":"69"},{"instructor":"79"},{"instructor":"80"},{"instructor":"96"}]

The numbers represent the row ID of the instructor table

In my CMS I can pull all of the School info just fine into a partial (Builder Details), and can pull the array of instructors, but I am struggling to pass this array over to look up the ID and get the instructors information. My thought right now is to send it to another partial like so:

{% "school/instructor" insProfile = instructorID %}

The partial school/instructor is getting the ID just fine. I have included the Builder Details component and set it up with the following:

Alias: builderDetails ModelClass: Instructors Plugin Identifier value: insProfile Key Column: id Display Column: member_name

I am getting record not found results. I am confused as to how to set the Identifier Value to match the value I passed through my partial. I tried {% set identifierValue = insProfile %} before the {% set record = ... %} is run, but that did not work either.

Still learning October, so any help is appreciated.

1-1 of 1

You cannot edit posts or make replies: the forum has moved to talk.octobercms.com.