Closed (fixed)
Project:
Bean (for Drupal 7)
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
22 Dec 2011 at 19:35 UTC
Updated:
13 Jan 2012 at 02:30 UTC
Is there a way for plugin programmers to cancel the output of a bean under certain conditions?
For example, if a Bean plugin contains a query but no results are given - the example modules currently still output the block with a title. In the case of bean_tax, I am outputting "No Results" but it would be nice to just not show the block at all in this case.
Is there a return command that would cancel the block from printing to the page? I have tried a few things to no avail...
unset($bean);
unset($content);
return FALSE;But it still returns the block with only a title.
Comments
Comment #1
indytechcook commentedYou can just override the tpl file bean.tpl.php in your theme.
You can also use theme_preprocess_entity
The title might also be coming form the block and not the bean. You can set the bean title to just like a normal block.