Define Custom Content Type CSS classes

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 CSFF class1S 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. Image
  • 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

 

 

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: