Drupal 7 – Printing a Views Results (Array)

If you ever want to view the array of a views results so that you can extend or modify the view, you can use the following code.

<?php $myview = views_get_view(‘whats_new’); $myview->set_display(‘page’);

You’ll need to have the Devel module installed and turned on in order for the dpm function to work.

Leave a Reply

Your email address will not be published. Required fields are marked *