Trying to set up a preprocess_field_hook()
to send a different css style depending on the node that is loaded for simpler theming. Will not work and been beating my head.
Have this set inside my template.php
and have my tpl pages named correctly (exam: node--node_page_one.tpl.php), which is loading fine with other functions already working. I feel like I need to have it point to the actual element somehow? Or should I be doing this somewhere else like in the preprocess_node_hook()
?
Sorry for my noobness.
function mytheme_preprocess_field(&$variables, $hook) {
$variables['fieldclass'] = '';
switch ($variables) {
case 'node_page_one':
$variables['fieldclass'] = 'tiny-blue';
break;
case 'node_page_two':
$variables['fieldclass'] = 'large-green';
break;
default:
$variables['fieldclass'] = 'black';
break;
}