Summary

We went through the basic concepts of Smarty plug-ins, such as their overall architecture and design. The low-level details of writing your own plug-ins were also described, such as plug-in types, and naming conventions for plug-in filenames and function names.

Several of the plug-ins cited were found through the public Smarty website, and the third-party Smarty Wiki website, but you should also refer to search engines when trying to find new plug-ins. Not every developer remembers to go back to the central repositories to store a copy of their plug-ins.

Also, the three example plug-ins developed on this chapter are good stepping stones for more flexible and complex plug-ins, so feel free to use those on your own projects.

Remember that the act of creating a new plug-in is only restricted by your imagination, so always take enough time to think around good plug-in designs, especially with regard to plug-in types. Always remember to choose the appropriate plug-in type for whatever task you need to perform.

But most of all, remember the design objective of templates—separating business logic from layout logic. This means keeping your templates as simple as possible.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.145.108.9