1

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 2

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.

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.

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.