I already found Get "Raw" views data (with no or little markup), but it wasn't, what I was looking for. I really do need the raw fields for having them differently styled in a module. Because the view itself should just be styled like it is, when navigating to it as page. But my module should be able to read the fields in raw-style. Or do I have to clone a view in order to be able to read the raw format?

1 Answer 1


Your module can load and execute the view itself. You can get the results from the view without changing the display.

// Load the view
$myview = views_get_view('my_view');
// Set arguments if you need to
// Execute the query
// Loop over the results
foreach ($myview->result as $row) {
  // The fields are properties of the row
  $x = $row->my_field;

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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