This is a really cool module. And surprisingly, it doesn’t seem to have gotten a lot of attention. But the Field Formatter Class Module is really pretty simple and straightforward. And with Drupal, I really like the KISS rule…
This module allows you to define a CSS class on a per field basis. You do this in the Display Settings for the field of the content type taht you are working with. So,
- I create a Content type called admin galleries for image galleries taht I, an admin, create.
- On the image field, I assign the class admin-gallery. this option is available because of the module
- now, i can add CSS as seen below to that specific class and only that content type will be affected. so I can style any
- gallery this way as long as I use that content type for the gallery. which makes sense anyway.
- I can also create a content type for user-galleries and style all those in a consistent way. and that is the real point that i wanted to acheive anyway.
Very cool module. And this post is where I heard about it. It has some other useful ideas on this subject too.
http://drupal.stackexchange.com/questions/30561/add-a-css-class-to-field-in-content-type