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