views:

99

answers:

2

I've overridden the views-view.list.tpl.php. I want to optionally included some extra HTML markup if a value in a CCK field 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?

+1  A: 

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.

Jeremy French
I need to be able to append a new LI item to a views list based on one of the valuee of a CCK field in current page. The LI markup is in the views-view.list.tpl.php file.
Camsoft
It may not be what you want precicely but a custom footer may fit the bill. Or look into preprocess functions.
Jeremy French
A: 

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.

Sid NoParrots