Easy debug variable to find what vars are available in a tpl.php file


/ Published in: PHP
Save to your folder(s)

An easy debug trick: gives you a variable that you can print in any tpl.php to find out what vars you have available there.


Copy this code and paste it in your HTML
  1. /**
  2.  */
  3. function _phptemplate_variables($hook, $vars) {
  4. //...
  5. $vars['args'] = $vars; //TODO: remove this debug variable.
  6. return $vars;
  7. }

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.