1

I am trying to print out the $view object using devel and dsm.

My function in function.php is

function my_theme_views_pre_render(&$view) {

  if ($view->name == 'my-view') {
     dsm('$view'); 
  }
}

But I just get this message below, there is nothing inside the message, the html is

<div class="alert alert-block alert-success" data-thmr="thmr_137">
  <a class="close" data-dismiss="alert" href="#">×</a>
  <h4 class="element-invisible">Status message</h4>
  <ul>
    <li><pre>$view</pre></li>
  </ul>
</div>

enter image description here

2

You are dsm'ing a string, try dsm($view);

| improve this answer | |
  • whoops.. Ok now I'm getting a php Allowed memory size error, so I guess that its working now I just need to increase memory – Joe Oct 26 '15 at 15:14
0

use dpm() instead like written here dsm()

| improve this answer | |

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.