|
[feature] Need way to determine if theme block contains content: msg#01008php.drupal.devel
Project: Drupal Version: 4.3.2 Component: theme system Category: feature requests Priority: normal Assigned to: Anonymous Reported by: jik Updated by: jik Status: active Attachment: http://drupal.org/files/issues/_10drupal (2.5 KB) Many themes want to be able to draw a box around one of the content regions of the screen, but shouldn't draw he box if the region is empty. They tend to use a style to define the box and then wrap the content of the region in the style by calling theme_blocks to generate the content, which causes the box to be drawn even if there is no content. The attached patch adds an optional argument to theme_blocks to tell it to check whether content would be rendered without actually rendering it. Note that this change is incompatible with themes which are still calling theme_blocks with the obsolete $this argument. I've patched the themes that come with Drupal, but 3rd-party theme maintainers will need to patch their own. To illustrate, I've included in my diff (although you obviusly own't apply it to the Drupal source code) the change I made to the bluerobot2 contributed them to use my theme.inc change to eliminate an ugly empty box. jik -- View: http://drupal.org/node/view/6090 Edit: http://drupal.org/project/comments/add/6090 |
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | [bug] node.module does operations during filtering when it shouldn't and generates PHP error upon empty filtered list: 01008, jik |
|---|---|
| Next by Date: | [bug] file uploads require PHP 4.3: 01008, Kjartan |
| Previous by Thread: | [bug] node.module does operations during filtering when it shouldn't and generates PHP error upon empty filtered listi: 01008, jik |
| Next by Thread: | [feature] Delete an avatar: 01008, weitzman |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |