Closed (fixed)
Project:
Drupal core
Version:
5.7
Component:
block.module
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
9 Apr 2009 at 14:51 UTC
Updated:
24 Jun 2011 at 18:09 UTC
Hi,
I was wondering if it's possible to show a block based on the content of a cck field. E.g. I want to show a block that contains some links, but I only want to display that block on nodes from a specific node type AND with specific content in a CCK field I created.
Is this possible? Would be very nice!
Comments
Comment #1
brakkevh commentedOr maybe it is possible to use a mysql query? So that if the query yields a result the block will be shown?
And if the query does not give results, no block will appear?
Comment #2
sjf commentedCCK Blocks would do what you need. You can use the php snippet here in the block configuration to only show on certain node types.
Be aware that CCK blocks creates a block for every CCK field you have. If you have a lot of fields, your block settings page may be very cluttered and slow. If so, you may want to avoid CCK blocks and try the snippet here instead.
Comment #3
dpearcefl commentedConsidering the lack of activity on this issue and that a solution was offered, I am going to close this ticket.