Seems like there should be a way to make blocks visible based on the taxonomy term of the current page. There is already the ability to make visibility conditional with the "Show block on specific pages" option in the block settings. However, what's missing is the ability to display a block on pages, contingent on their taxonomy, and regardless of their page URL. Sure, it would be possible to specify EVERY page in the list, but that isn't practical. You could also put something like "taxonomy/term/5" in the list and the block will show up on the main page for that term, but not on the nodes themselves.
For instance, I'd like to display a block with links relevant to a particular taxonomy term on every page that's classified with that term. That does not appear to be possible, currently.
Comments
Comment #1
icenogle commentedI'm also needing this capability.
It seems like you could do this in the block definition itself -- that is, conditionally print content -- presuming you can get the taxonomy terms for the current page. But you're defeated by another problem: You can't turn off the block title, if there is no content for the block. The only trick I know for turning off a block title is through the css file, and that is all or nothing -- not conditional.
I just returned from the 4.7 beta demo, and I see that there is a new block visibility setting, which is "Show if the following PHP code returns TRUE." This could be used to address the taxonomy-based conditonal display of the block.
Still no help on conditional display of block titles, though, that I can see.
Comment #2
jacobson commentedI too would find this capability very useful.
Comment #3
marcoBauli commenteddefinitely interested into this too.
+1 for me
find also some juice on the little more advanced request here: http://drupal.org/node/4529
Comment #4
nedjoSee http://drupal.org/node/20382 for a suggestion on how we could enable this.
Comment #5
nedjoOops, I meant http://drupal.org/node/72195, Pass block.module queries through db_rewrite_sql().
Comment #6
marcoBauli commentedguess this issue didn't catch up for 4.8, did it somehow?
Comment #7
lilou commentedSee http://drupal.org/node/134428
Comment #8
emdalton commentedI had this working in D5 with custom php script in the block configuration, and now, thanks to help from eojthebravem, I have it working in D6: http://drupal.org/node/507540
Comment #10
mparker17Subscribe. I would really like to see this.
Comment #11
IE938492 commentedThe Context Module solved most of my issues without PHP. Excellent module.
http://drupal.org/project/context