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] <?php $myview = views_get_view(‘whats_new’); $myview->set_display(‘page’); $myview->pre_execute(); $myview->execute(); dpm($myview->result); ?> [/php] You’ll need to have the Devel module installed and turned on in order for the dpm function

Drupal – Viewing a nodes fields – Devel

Ahh Drupal, you’re one tough cookie to crumble.  If you want to view the structure of your node objects, see the following code: 1. Enable Devel module. 2. In node-{content-type}.tpl.php 3. dsm($node); dsm($content); 4. Don’t forget to wrap the above php code in php tags! Now you should be able to see all node and content fields.

Drupal Must Have Development Modules

Devel: Allows you to automatically create dummy content. provides information about pages/errors and memory usage Coder: Reviews code fro Dropal coding standards basic security checks Security Review: More thorough review of your code Also can review contrib modules for security issues. SimpleTest This is now a core module Automated testing