Community

Popup selector of nodes on another node

Maybe this is a views question, but I thought I'd start here...

I have a series of pages describing different types of classes for a sports club.
On each of these, I'd like a block to appear, containing information about an instructor.

The instructors are a content type, each with a uid, name, photo, etc.

I'd like my content authors to be able to select one instructor from a list, when they're creating one of these pages.
I will then pass that selection as a filter into the view that creates the block, so that the bock shows the correct instructor for the page.
What I can't figure out how to do is to get the selector populated with all the instructor names (and I suppose their uid's, as key | value pairs, since the names aren't guaranteed to be unique).

Do I need some PHP in my Allowed Values field?

Comments

Use a reference, not a list field

If your class is a content type and your instructors are a different content type, just use entity references. Install it and add a field called Instructor (or whatever) to your class. Choose bundles of your instructor type and sort by title (if that's the instructor name) or field attached to entity (if that's where their name is).

Then you can use any number of ways and modules to display as desired.

adtl: If you specifically do want pop-up/dialog to add the instructors, take a look at References Dialog as an add-on widget to the above.

I'm unique, just like everybody else.
If I helped, please pay it forward, backward or sidelong.