1

I have a pdf sharing site with a content type which called PDF. This content type has many fileds (such as author, description, rating, etc). These fields display in simple rows but I want to change either their form and css. for example I want to show Rating number much bigger (and in other color) on the top of each post. what can I do?
Am I able to define new css classes for these fields?

2

create a new template file and add any classes you want. Here's a good introduction to D7 templates.

your template should be named like this: node--node_type.tpl.php. In your case, I think it should be node--pdf.tpl.php. You can use node.tpl.php as a starting point

2

One more way is to use a node preprocess hook in your template.php. It might look something like

YOURTHEME_preprocess_node(&$var){
 if($var['type'] == 'PDF'){
   drupal_add_css(...);
  }
}

refer this for details

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.