Answers.Body: <p>To view debug output for the main page template, add <code>&amp;smartyDebug=1</code> to the url of your page.</p>
  
  <p>To view debug output in a nested template, add the tag <code>{debug}</code> in the template itself.</p>
  
  <p>Note that only users with the permission "view debug output" will be able to see debug info.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-04-27T17:15:56.827Z
Answers.LastActivityDate: 2015-04-27T17:15:56.827Z
Answers.UserDisplayName: Coleman
Answers.Body: <p>There is only one smarty template object and hence only one scope. Hence the variables that are displayed at the top level include the variables that are displayed at all levels. </p>
  
  <p>You can optionally rename a variable and/or send in a constant to the included templates, but besides that its all one scope. You should think of template inclusion more as a macro rather than a function call.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-04-28T00:43:08.270Z
Answers.LastActivityDate: 2015-04-28T00:43:08.270Z
Answers.UserDisplayName: Donald Lobo
Body: <p>The popup window enabled at civicrm/admin/setting/debug?reset=1 contains only the top level Smarty template variables. How can I see the variables for a lower level included Smarty template?</p>
  
Tags: <debugging><smarty>
Title: How can I display variables for templates other than the top/main one?
ThreadText: # How can I display variables for templates other than the top/main one?
  
  (Asked by: username_0 on 2015-04-27)
  
  The popup window enabled at civicrm/admin/setting/debug?reset=1 contains only the top level Smarty template variables. How can I see the variables for a lower level included Smarty template?
  
  **Tags:** debugging, smarty
  
  
  ---
  
  ## 2 answers
  
  ### Answer by username_1 on 2015-04-27. Score: 3
  
  To view debug output for the main page template, add `&smartyDebug=1` to the url of your page.
  
  To view debug output in a nested template, add the tag `{debug}` in the template itself.
  
  Note that only users with the permission "view debug output" will be able to see debug info.
  
  
  ---
  
  ### Answer by username_2 on 2015-04-28. Score: 0
  
  There is only one smarty template object and hence only one scope. Hence the variables that are displayed at the top level include the variables that are displayed at all levels.
  
  You can optionally rename a variable and/or send in a constant to the included templates, but besides that its all one scope. You should think of template inclusion more as a macro rather than a function call.
  
  
  ---
  
  