开发者

How do I access CCK field values in overridden views-view-list.tpl.php template in Drupal?

开发者 https://www.devze.com 2023-01-10 03:40 出处:网络
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.

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消