Creating Custom Block Tags in Smarty
In this article we have learned how to simplify your Smarty template code and to avoid repeating complex templates by using block plug-ins. Doing so allows us to easily to maintain and update templates as required without worrying about the implementation details of web page components.
To demonstrate the block functionality we implemented a plug-in called
teaser, which could be used to output the summary of an article or document.
You can find the full block plug-in documentation on the Smarty web site at http://www.smarty.net/manual/en/plugins.block.functions.php.
- Download a PDF version of this article
- Put your PHP knowledge to the test with our online and iPad/iPhone quizzes
- View or post comments for this article
- Browse similar articles by tag: PHP, Smarty