Tell me more ×
Drupal Answers is a question and answer site for Drupal developers and administrators. It's 100% free, no registration required.

I want to print variables of a particular content type, but I have not found any way. Here is my code.

function mytheme_preprocess_node_mytype(&$vars) {   
  echo '<pre>';print_r($vars); echo '</pre>'; 
}

This function is in template.php. Is there a problem with my code?

share|improve this question
which version. D7 or D6? – monymirza Nov 15 '12 at 6:52

1 Answer

Try this: (D7)

function YOURTHEME_preprocess_node(&$vars) {
  drupal_set_message('<pre>' . print_r($vars, true) . '</pre>');
}
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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