Posted by timmillwood on July 16, 2009 at 1:48pm
Jump to:
| Project: | Views Custom Field |
| Version: | 6.x-1.x-dev |
| Component: | Code |
| Category: | bug report |
| Priority: | critical |
| Assigned: | Unassigned |
| Status: | active |
Issue Summary
When running the code...
<pre>
<?php
$view = views_get_view(allposts);
$view->execute();
print_r($view->result);
?>
</pre>The result from the views custom field is not shown.
Comments
#1
Apparently this issue is also causing the problem in this issue: #573390: Custom text values don't work
Any update on this?
#2
Instead of calling
$view->execute(), call$view->render(). The$view->resultarray should be updated then. The problem is that Views does not have a post-execute hook where VCF would be able to compute the field values. Hence, this computation can only occur at pre-render time.Note that this technique currently works only for the PHP Custom Field. If you report that it works well, I can extend it to Markup and Rownumber.
#3
Drupal 7 version (http://drupal.org/project/views_php) updates $view->result.