Download & Extend

Is custom Field available to field.tpl?

Project:Views Custom Field
Version:6.x-1.0
Component:Code
Category:support request
Priority:normal
Assigned:Unassigned
Status:active

Issue Summary

I'm hoping to use the custom row number to wrap an i.d around an imagefield to allow me to switch between views, that show a close up, and then back but maintain page position.

Therefore I want to have the row number available at field level.

When I print_f the $row variable in the views-view-field.tpl it doesn't display the custom field in the stdObject.

stdClass Object
(
    [nid] => 154
    [node_data_field_picture_field_picture_fid] => 103
    [node_data_field_picture_field_picture_list] => 1
    [node_data_field_picture_field_picture_data] => a:3:{s:11:"description";s:0:"";s:3:"alt";s:0:"";s:5:"title";s:0:"";}
    [node_type] => work
    [node_vid] => 154
    [node_data_field_picture_field_projectname_value] => ecarg
    [node_data_field_picture_field_client_value] => BEAUMIND
    [node_title] => Work ecarg
)

I was hoping to get the row-number or count variable here.

Does custom field do this or is there a better way to get this value?

Thanks.

Comments

#1

Guess not.
I did it in the tables template instead, but had to use a condition making it a bit more ugly solution.

#2

I'm also attempting to find the elusive rownumber field from my custom php file views-view-fields--myview.tpl.php. There is something in the $fields but not very usable; there's nothing in $row. Is there any way to access it? Thanks! (ps http://drupal.org/node/165516 shows how to do something similar with tables but it's a hack not desired for present purpose.)

nobody click here