Is there a way to dynamically change the facet block title on each page based on the field label of the specific content type? The same field has different labels in each content type.
For example if we have in ‘Content type 1’ a field with Machine name: field_1 and label ‘AA’ and the same field in ‘Content type 2’ with label ‘BB’ when we are on Content type 1 page the facet block mast show AA and when we are on Content type 2 page it mast show BB.
I found a way to change the title with CSS using the Code per Node module, but it is not automatic and I have to insert the code in each content type. It doesn't seem to be right. There must be a better way.
I use this CSS in each content type.
.block-facetapi-”THEBLOCKID” .block-title {
visibility: hidden;}
.block-facetapi-”THEBLOCKID” .block-title::after {
content: 'Label B';
visibility: visible;}