I try to make a custom view using templates. I need to print one certain field at the last row, after all other fields have been printed like so:
--1st row
field1
field2
--2nd row
field1a
field2a
--last row
myfield
I can manage to display a custom field inside field template like so:
<?php print $fields['title_1']->content; ?>
However there are few problems:
1/to display the field as needed, I should print the field inside row template - but above code doe's not work inside row template, only inside field template.
2/the field get's printed twice - as normal field and as a field called directly from template as well.
The questios are
1/how can I print a field called from other than field template?
2/To prevent printing the field twice, I assume I need to exclude it from display, but after that it is not available inside template.
I found this article https://drupal.org/node/687046 where people say it is possible. I used following code but it is not working
print_r($view->result[$id]node_data_field_title_1_field_title_1_value)
can anyone point me to right direction?
Thank you
ANSWER: the correct code to put inside row template is
print $view->result[$id]->node_title
this displays excluded field