hi
I am trying to create a table in views which has different colours for the rows according to the value of a field in user. At present this is either white or green if the user:field_paid is set or not.
Following the video of torontowebdeveloper on youtube I have created a tpl.php file in my subtheme templates directory and a template.php in the root of the subtheme.
The tpl.php seems to sort of work but does not have any impact on the targeted row or even a field apart from removing the value of the row or field. Though I can see the class in firebug.
When I put anything such as subtheme_viewdetails($var){} in template.php then the page does not display at all (WSOD) and the information on views shows the message file not found in ./.
I have been trying to solve this for days without success.
Can anyone help or should I just give up
Comments
I give up will use an
I give up will use an alternative or say to the client it is impossible with Drupal
What you are looking for is
What you are looking for is views-view-table.tpl.php.
Thanks fubhy, you have given me hope.
Thanks fubhy, you have given me hope. But what I was trying to do was follow to put the action code in template.php, eg
function ebhc_views_view_field__participant_registered__page_4__field_family_name($variables) {
some code
return $variables["output"];
}
Then in the template file in the template directory have views-view-field--participant-registered--page-4--field-family-name.tpl.php place the rendering of the field selected as in
<div class="fname"
<?php return $output; ?>>
</div>
So should I put both the actions and the rendering in the tpl.php file?