1

I got a site where we got pages tagged with several taxonomy terms. We also got several Contactblocks (added as Content Type & displayed by Views) that are tagged with the same set of taxonomy terms.

The Content Type "Contactblock" has the fields E-Mail, Phone & Room. Those Fields may vary from page to page. The reason behind this is some employees have different positions and those have to be displayed on different pages with different information. May way to go atm was to add multiple Contactblocks but its not clean enough for me.

My idea was to display for each tagged term a specific field of E-Mail, Phone & Room. But idk how the system can associate it then..

Atm its like page<->taxonomy term<->contactblock but it should be like page<->taxonomy term, for each tax term<->create fields: mail, phone & room

Any idea how I can solve this? Any better idea is apreciated

6
  • You could do page<->contactBlock will that work for you? or do you really need those tax term tags?
    – No Sssweat
    Commented Jul 6, 2016 at 9:23
  • how woud this improve my situation @NoSssweat ?
    – SaifDeen
    Commented Jul 6, 2016 at 9:24
  • no need to fill the Database with tax terms, I guess.
    – No Sssweat
    Commented Jul 6, 2016 at 9:26
  • 1
    it should be like page<->taxonomy term<->contactblock<->for each tax term<->create fields: mail, phone & room I think you mean page<->taxonomy term, for each tax term<->create fields: mail, phone & room cause no point in creating the mail, phone & room fields in the tax terms and also in the Contactblock.
    – No Sssweat
    Commented Jul 6, 2016 at 9:29
  • I use the tax terms to associate contactblocks of employees to several fields that they work at..
    – SaifDeen
    Commented Jul 6, 2016 at 9:30

1 Answer 1

0

Yes you can add fields: mail, phone & room to each of your tax terms, but the problem would be that all your employees would have the same mail, phone & room, because the fields belong to the tax term and not the employee. Unless you create a unique tax term for each of your employees this would work, but why do this when page<->contactBlock will do the same?

So either you stick with page<->taxonomy term<->contactblock

or go with page<->contactBlock using the Entity Reference module in D7 (for D8 Drupal Core already has this module's features). This option will save you save Database space since you don't create tax terms.

7
  • I'm I right that I have to still add multiple contactblocks for every page and every position the employee works at?
    – SaifDeen
    Commented Jul 6, 2016 at 10:27
  • For each employee you need to create a contact block for them. I assume in the employee profile you have a field for his position. some employees have different positions and have to be displayed on different pages You can then use views to filter employees by position and show only employees with position "X".
    – No Sssweat
    Commented Jul 6, 2016 at 10:44
  • right and the positions are my tax terms. How should I filter them if I remove the taxonomy from the relation?
    – SaifDeen
    Commented Jul 6, 2016 at 11:04
  • Also that wouldn't solve the fact that I still have to add multiple Contactblocks that contain the different mail, phone etc...
    – SaifDeen
    Commented Jul 6, 2016 at 11:26
  • How should I filter them if I remove the taxonomy from the relation? You can add a Contextual Filter with a default fixed value of the employee position.
    – No Sssweat
    Commented Jul 7, 2016 at 3:13

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.