0

how can I get the node id through the : preprocess_views_view_fields()

0

You can get nid (node id) from $vars as like following:

$vars['row']->nid

You can also check the $vars to view the structure of the object as like following:

dpm($vars);

To use dpm(); you have to install devel module.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.