Implementation

random_tom - April 25, 2008 - 21:11
Project:Block Class
Version:5.x-1.0-rc
Component:User interface
Category:support request
Priority:normal
Assigned:Todd Nienkerk
Status:won't fix
Description

Hi, I'm trying out the block class module on a Drupal 5.5 install. I've installed the module, everything appears to be working OK. I'm just not sure what information to put in the "CSS class(es)" field.

I have tried the following with no success:

1. Adding the full classes straight into the field (field limited to 128 characters)
2. Adding title of classes into the field and ading the classes to my style sheet.

Obviously I am doing something stupid. Could you please point out the error of my ways.

Thanks in Advance.

#1

Todd Nienkerk - April 25, 2008 - 21:24

Tom:

Have you added the PHP snippet to your block.tpl.php file? I describe how to do this in detail on the project page.

Regarding what you should put in the "CSS class(es)" field, you should add whatever you want to appear in the top-level div of that block (or wherever you put the PHP snippet described above). Let's say you want to add a class "orange" to your block's div. This means you want to turn this:

<div id="block-[modulename]-[deltavalue]" class="clear-block block block-[modulename]">

...into this:

<div id="block-[modulename]-[deltavalue]" class="clear-block block block-[modulename] orange">

To do this, type "orange" into the "CSS class(es)" field. Save the block. Now you'll need to add class .orange to your theme's style.css file. From there, it's just a matter of working with CSS.

#2

David Strauss - April 29, 2008 - 15:42
Status:active» postponed (maintainer needs more info)

#3

wildmtsky - May 15, 2008 - 21:03
Title:Implementation» Difference between Block Class and Block Theme?

I have both Block Class and Block Theme installed on my project and I am wondering what is the difference between the two? They appear to do the same thing but in different ways. Please help clarify.

Thanks!

#4

gpk - June 11, 2008 - 15:48
Title:Difference between Block Class and Block Theme?» Implementation

Resetting title.

@wildmtsky: suggest you create a new issue for unrelated questions ... ;)

Actually the difference is that this module lets you add (using the block's configure page) a CSS class to a block that can be picked up in your CSS files, while the Block Theme module lets you specify completely different block templates (i.e. block-something.tpl.php files) which can be used for whichever blocks you want (i.e. you can then have blocks with different markup structure). Block Theme might be better named "Block Templates" or similar.

#5

Todd Nienkerk - June 11, 2008 - 17:17
Assigned to:Anonymous» Todd Nienkerk
Status:postponed (maintainer needs more info)» won't fix

@gpk: Thanks for handling that one.

I'm closing this issue due to inactivity. It's been a month-and-a-half since more information was requested.

#6

gpk - June 11, 2008 - 18:05

Cool :)

I've actually suggested that something akin to the functionality of Block Class and Block Theme should be in core anyway since to me these are fairly natural themeing options and I can't really see any reason for them *not* to be there.

#7

Todd Nienkerk - June 11, 2008 - 18:13

@gpk: We've been having the same discussions on our end. My colleague David Strauss has suggested I file an issue to include something like in in D7. Perhaps you're more up to the task than I? :)

#8

gpk - June 11, 2008 - 18:33

Oops, forgot the link last time. Do add your +1 !

http://drupal.org/node/257032#comment-878738

#9

Todd Nienkerk - June 11, 2008 - 18:43

Done and done. Thanks, gpk!

#10

gpk - June 11, 2008 - 20:33

Um, it looks like you are giving a general +1 for "blocks sytem refactoring" ... perhaps you could edit it your post to refer to #45 and say why you think this is a good idea (else the +1 won't carry any weight).

:)

#11

Todd Nienkerk - June 11, 2008 - 20:41

Done.

#12

gpk - June 11, 2008 - 20:52

Even cooler! :D

 
 

Drupal is a registered trademark of Dries Buytaert.