For blocks, putting in for the block title hides the title text, but the title background still shows up.
Is there any way to get rid of this?

I'd like to be able to stack blocks on the right sidebar without having large spaces between them.

Comments

xmacinfo’s picture

Please note that Deco for Drupal 5 does not display title and title bg, while deco for 6 does.

add1sun’s picture

Status: Active » Fixed

Hrm, yeah your best bet is to customize your CSS to override and remove the block title images and height. You can remove it for all of them or target individual blocks in your CSS with the block ID.

xmacinfo’s picture

Status: Fixed » Active

Hi Add1sun! When are you planning a trip back to Montréal?

This is a PHP fix, not CSS.

I took the Garland for a tip.

Deco have :

  <?php if (isset($block->subject)): ?>

The fix is :

  <?php if (!empty($block->subject)): ?>

With this fix Deco behaves properly.

add1sun’s picture

Component: User interface » Code
Category: support » feature

hey xmacinfo, yeah i noticed the !empty problem as well but that doesn't remove the light grey background stripe. So you still need to muck with the CSS to completely remove it. For that reason, it actually looks better to leave the h2 styling printing (which is what the isset/!empty thing removes) unless you are going to go in and manually remove all of it from the CSS anyway. Basically the way the CSS images are added would need to be redone in order to make a <none> block header to really, simply disappear.

I guess we should move this to a feature request instead since I suppose having the entire header area be removed is more the expected behavior.

xmacinfo’s picture

Hi add1sun.

I don't remember having made any CSS modifications to Deco 6 aside the single PHP line change in the block template.

I wanted the same behavior as Deco 5: to have the whole <h2 class="title">Block title here</h2> to disappear when the block title is empty. When the H2 is not sent in the HTML structure, there is not gray background since the CSS does not see the title H2 tag.

So, if there is a title, the block header is sent to the browser, and the style can send a background. And if there is no title, the H2 is not sent at all.

The blocks I targeted are the ones on the right column, though. I did not try all columns combination.

Note that the original discussion started here: http://drupal.org/node/172876 --> I guess it should be closed since it's clearly not a Drupal issue, but a Deco 6 one.

Other users were able to apply the same one-line fix for Deco 6.

add1sun’s picture

Status: Active » Closed (duplicate)

I'm marking this one a duplicate of that so that we can keep the convo in one place. #172876: Block Titles bar shown even if block title empty