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

 

 

Advertising on your site – Adsense and Amazon

Well, I have had enough with Adsense. I tried for weeks to get them to place ads on my site with no luck. DOCResource.org is a niche site anyway but I guess that I don’t get enough traffic for them. But it is annoying because I did set up the bank routing info and even received that first token payment that I then had to confirm. So I thought it was OK. But then, weeks with nothing. Forget it.

So, I looked for a few other placed to get ads. At this point, I’m not really trying to monetize my site; I just need some real ads to help me do the design stuff. If I were any good at design this wouldn’t be an issue but I am not so it is. I need to be able to place the ads so that I can see what the hell I am doing.

So, Amazon’s Affiliate Program looked good. And it is. I really like it. I created the account and was approved a few hours later. The confirmation was easy. I gave them my Magicjack number and clicked “call” and literally, three seconds later I got a call, put my on screen pin in and was off. I can set up the payment stuff later and get started now.

And I like what I can do. I can pick products that I want to show that are sold by Amazon. In my case, I picked a bunch of books that are concerned with incarceration since that’s my audience. And there are a bunch of way to show the ads. There is no Module PER SE the way there is with Adsense. But you don’t need it. Amazon will generate the code for you and you can just stick it into a content type that allows Full HTML. Then you can use Panels to place that content anywhere you want, then use CSS to tweak it a bit and you are good. I got more done in a few hours with Amazon than with Adsense over weeks.

CSS and Custom Content Types

I have a Custom Content Type for Images. I uploaded my logo to the site using this CCT and I also uploaded three images that I am using for my image slideshow that I posted about earlier today. Tonight I went to style the slideshow using some CSS to make a border. And lo and behold, when I make the test CSS changes in Chrome’s analyzer (I use it and Firebug) it changes the other image as well. No surprise really. I believe the easiest thing to do is to maybe create a new content type for things that will serve different purposes. I may be wrong, but I’m gonna try that out.