I created a view to show a paricular node of Ubercart product type. In Ubercart catalog module there are hook_nodeapi to add breadcrumb for current product (on case 'view'). Views generate only 'load' operation. No 'view' operation appear.

I made some changes in uc_catalog module to print generated operations - only 2 'load' - for node 1 and (why ?!!) for node 2, when i dispalying only node/1.

View type - Node. Row style: Fiedls. Path for page - 'node/%'. Arguments Node: Nid.

Comments

dawehner’s picture

this is clear.

nodeapi $op == 'view' is just printed when node_build_content is executed, and here you only see fields, so this seems to be not logically.

i'm not sure, wether you need row style fields here, if you only print out a single node.

if you need this you could execute argument validation code, and just do sth. like this

<?php
$node = node_load($argument);
node_invoke($node, 'view', FALSE, TRUE);
?>
taran2l’s picture

i need field style because my nodes use 2 taxonomy vocabularies and by default node view terms are shown in one field. i use custom node view to separate terms into two fields.

maybe it's not logically, but i think when View Type is Node you want to allow other modules to interact with your node, and doesn't matter who built it - drupal core or views.

merlinofchaos’s picture

Status: Active » Closed (won't fix)

The 'fields' operation never loads a node. Therefore it does not interact with nodeapi at all.

kenorb’s picture

Any other nodeapi op executed on list of nodes?