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 Answers 2

2

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

1
  • 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
    Commented Oct 26, 2015 at 15:14
0

use dpm() instead like written here dsm()

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.