2

I want to display a block when a node contains a entity reference field when specific term is present.

I have tried numerous modules that did not work for me or perhaps I did not set them up right, term_condition token_conditions entity_field_condition (using the appropriate patch)

EDIT: it seems the term_condition works on a clean install after applying some pending patches on the issue queue. So this probably is a problem with my installation.

4
  • perhaps I did not set them up right did you use the term id rather than the term name?
    – No Sssweat
    Commented Jun 14, 2018 at 10:08
  • @NoSssweat yes I did try all possible combinations, have you used them are they working or perhaps there is something in my system that prevents them from working ? I am working with block visibility groups module perhaps something is wrong with that ?
    – GiorgosK
    Commented Jun 14, 2018 at 10:36
  • 1
    term_condition worked; although, it's buggy. When I try to configure the block after setting term ID visiblity, I'm getting an error. But as far as displaying the block goes, it works as expected. Note I am testing on a fresh install.
    – No Sssweat
    Commented Jun 14, 2018 at 10:58
  • It looks like term_condition is exactly what you want. There are some pending patches that might help.
    – Andy
    Commented Jun 14, 2018 at 12:07

1 Answer 1

0

The easiest solution is probably term_condition

Install/enable the module and then on the block layout of a certain block you will be presented with a term visibility setting where you can search for term that will be used as the visibility condition.

enter image description here

NOTE: Currently the module is incompatible with rules as rules has its numerous conditions on its own. This issue has been reported here

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.