| Recommend this page to a friend! |
| Packages of Michael Beck | Xoops 2.5 | htdocs/xoops_lib/vendor/smarty/smarty/docs/programmers/api-functions/api-assign.md | Download |
|
|||||||||||||||||||||
assign() assign variables/objects to the templates Descriptionvoid assign mixed var void assign string varname mixed var bool nocache You can explicitly pass name/value pairs, or associative arrays containing the name/value pairs. If you pass the optional third > Note > > When you assign/register objects to templates, be sure that all > properties and methods accessed from the template are for presentation > purposes only. It is very easy to inject application logic through > objects, and this leads to poor designs that are difficult to manage. > See the Best Practices section of the Smarty website.
These are accessed in the template with
To access more complex array assignments see
See also |