Closed (fixed)
Project:
Views (for Drupal 7)
Version:
7.x-3.x-dev
Component:
Documentation
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
19 Jul 2011 at 11:19 UTC
Updated:
29 Jun 2012 at 16:21 UTC
Jump to comment: Most recent file
Comments
Comment #1
srebelo commentedHi David,
The hook_node_view will only modify the node page. A view is not a node display.
All view fields have a "REWRITE RESULTS" option (see image attached) where you can rewrite the field by adding other fields available in the view (look at the "REPLACEMENT PATTERNS") or just modifying the field itself.
Hope this helps!
Comment #2
dubs commentedThanks srebelo.
That explains why it isn't being called. I'm pretty sure hook_nodeapi($op = view) was called before as this is a port from D6 to D7 which is why I expected it to work here.
The solution you suggested wouldn't work in my case unfortunately because the module is the only source for the changed output. I could use a PHP custom field in Views to do this and pull the data from the module though and that would work.
I guess the question would be more along the lines of is there a hook_field_view function or something like that which would allow field values to be changed by modules before they are called by views?
Comment #3
kars-t commentedHi
I am closing this issue to clean up the issue queue. Feel free to reopen the issue if there is new information and the problem still resides. If not please make sure you close your issues that you don't need any more.
Maybe you can get support from the local user group. Please take a look at this list at groups.drupal.org.