blocks

Skinr won't work if your theme is disabled

Published September 23, 2010

Every so often, when migrating Drupal sites to other computers, I notice that themes become disabled. Whatever the cause, disabled themes cause bunches of problems, and my big problem today happens to be with Skinr.

If you are trying to edit settings in Skinr, for example settings on a block, Skinr only shows you those options based on the currently enabled themes.

To get the Skinr block settings fieldset back, visit your admin/build/themes page and make sure at least one theme (like your default theme) is enabled.

Hide my block view if CCK field is empty

Published September 21, 2010

Let's say you have a CCK Imagefield you'd like displayed in a sidebar instead of the main $content area of your page. You can check exclude under Display Fields for that content type, and then use Views to pull out the field and stick in a block display, but if your node does not contain an image, you may notice that a few empty <div> tags are returned, and your theme might not be too friendly in this case. Now you need to find some way to hide that view if the field is empty...

Why not try adding a filter to the View?

Block Visibility

Published June 15, 2009

I was recently was asked by a client to assist them in creating and displaying a block that would only appear on certain pages within the site. In their case, they wanted to only display the block on node pages - but only when the node was of a particular content type.