0

I have two content types: 1) Team member and 2) office

There are about 150 team member nodes that need to be associated with 50 offices. When a team member is added to the site, there should be an auto complete field, where the name of the office, the member is in, can be selected.

After saving, the team member information should show up at the office which she has just been associated with. (Name, title and photo should be displayed - which could be done with Display Suite's view modes.)

In addition, each team member is associated with a specific function (head, partner, principal, consultant). This is done with taxonomy. On the office page, however, the team members associated with that office should be ordered according to the team members' taxonomy function. Those team members with the taxonomy term "head" should be displayed first, those with taxonomy term "partner" second, "principal" third etc.

How can this best be achieved? I have taken Entity Reference and Nodereference modules into consideration. Can this be done with Display Suite only or do I need to create a Views block?

1 Answer 1

0

I solved this with the modules: entity reference and corresponding entity reference, setting up a relationship between the "team member" and "office" content type.

Then I created a view and added A Contextual Filter choosing the reference field from the "team member" content type as a contextual filter. Then I added: "Provide default value" "Content ID from URL" in the "When the filter value is no available" option.

After that I chose "Content: Function" field as a sort criteria so that the team members will be displayed according to the taxonomy order. Finally I added the block, which I created with the view, to the office page content type under manage display.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.