Variables: Cakupan variabel

You have the choice to assign variables to the scope of the main Smarty object, data objects created with createData, and template objects created with createTemplate. These objects can be chained. A template sees all the variables of its own object and all variables assigned to the objects in its chain of parent objects.

By default templates which are rendered by $smarty->display(...) or $smarty->fetch(...) calls are automatically linked to the Smarty object variable scope.

By assigning variables to individual data or template objects you have full control which variables can be seen by a template.

Sumber
https://www.smarty.net/docs/en/language.variable.scopes.tpl