Define block classes in info file
tstoeckler - April 20, 2009 - 18:57
| Project: | Block Class |
| Version: | 6.x-1.x-dev |
| Component: | User interface |
| Category: | feature request |
| Priority: | normal |
| Assigned: | Shannon Lucas |
| Status: | active |
Jump to:
Description
As referenced in #438394: Add to Drupal 7 Core and in relation to #439292: Port to Drupal 7:
What would be necessary to let the block classes be defined in the themename.info file? Could you point me in any direction? I looked for a while on api.drupal.org and in common.inc and theme.inc but couldn't find exactly what I wanted.
Altering the form to show a select list, even I managed, but filling it with what I put in .info...
Thanks in advance

#1
@tstoeckler: We (Four Kitchens) are actually in the middle of developing this feature internally as a favor to Top Notch Themes. I've altered Shannon Lucas to add some TODO comments to the code and commit his latest work.
#2
Sounds cool. I would so much love to have this feature to show off Drupal 7 with...
#3
Shannon Lucas has committed this feature to the 6.x-1.x-dev snapshot. It won't get recompiled for several hours, so you'll need to check it out of CVS instead of downloading it from the project page.
Shannon also added @TODO comments for all the stuff that still needs to be done.
#4
I just got my webserver back up and running and tried it out. I modified page.tpl.php as usual and garland.info, and even though the form appeared on block/edit as it should, the submission didn't quite work out.
Drupal gave me following messages:
Note: I set the two block classes 'red-border' and 'green-background' in garland.info and submitted 'wow' to the arbitrary block class field. I'll try to debug a little...
#5
Well, stupid me. I realized that the submit function just does a drupal_set_message for debugging purposes so that it's not really intended to work currently.
Is there a status update, BTW? Is Four Kitchens / Shannon Lucas still on this? Would be nice to know.
I'll stick my head into it a little bit more, in the next few days(/weeks)...
#6
tstoeckler: Progress on this feature has stalled a bit due to other work. I'll look into the status next week.