PhpRiot
Follow phpriot on Twitter
Sponsored Link
Download Article
Download this article in PDF format with all listings and files.

Price: $5.00 AUD
(Approx. $5.00 USD)

More information
Become Zend Certified

Prepare for the ZCE exam using our quizzes (web or iPad/iPhone). More info...


When you're ready get 7.5% off your exam voucher using voucher CJQNOV23 at the Zend Store
Free iPad/iPhone App
Available on the App Store

  • PHP manual
  • Zend Framework manual
  • Smarty manual
  • PHP articles
  • PHP training

Creating Custom Block Tags in Smarty

Conclusion

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.

Other Options

In This Article