How do I access CCK field values in overridden views-view-list.tpl.php template in Drupal?
I've overridden the views-view.list.tpl.php. I want to optionally included some extra HTML markup if a value in a CCK f开发者_JAVA百科ield for the current node is set to certain values.
How can I access CCK field values in a views-view.list.tpl.php view template file?
views-view.list.tpl.php. does the whole list not a node, are you wishing to style the whole list or just an item?
in views-view-fields.tpl.php there is a $fields
variable defined which should have what you want.
You should try devel and theme developer they will make this much easier than using SO.
This module might be useful : http://drupal.org/project/views_customfield
By adding PHP code you can arbitrarily do output of your CCK field as you see fit.
精彩评论