Smarty PHP Template Programming and Applications
  FREE ONLINE EDITION: Read full chapters online, download free samples from the book and more...
  Index > Chapter 5
Book Contents

Preface
Chapter 1: Introduction to Smarty
Chapter 2: Smarty Site Architecture
Chapter 3: What Designers Need to Know
Chapter 4: Creating a Template
Chapter 5: Advanced Templating
Chapter 6: Smarty Functions
Chapter 7: Debugging for Designers
Chapter 8: Built-in Smarty Variables and Methods
Chapter 9: Caching and Performance
Chapter 10: Extending Smarty with Plug-ins
Chapter 11: Filters
Chapter 12: Internationalization

Index

Free Content
Chapter 6: Smarty Functions[345 KB PDF]

Code Download

Download
Smarty Cheat Sheet


Download PDF Version [285 KB]

Download GIF Version [304 KB]

 

Chapter 5: Advanced Templating

In the previous chapter, you have learned about the basic workflow of Smarty templates. We demonstrated how you can implement conditions and loops, and also demonstrated usage of some necessary Smarty functions that are used in everyday web applications. However, there are a lot of features that you are not familiar with as yet. In this chapter we will give you a basic introduction to plug‑ins and modifiers. We will also go through the creation of two advanced web applications, which will further clear your concepts. By the end of this chapter you will be introduced to configuration files, a special storage medium for storing the value of Smarty variables and using them later.

  • Chapter 5: Advanced Templating
    • Smarty under the Hood
      • Compile Steps
      • Prefilters and Postfilters
      • What is a Smarty Modifier?
    • Stretch your Imagination with Smarty
      • Student Transcript
      • Photo Gallery
    • Available Modifiers
      • capitalize
      • count_characters
      • cat
      • count_paragraphs
      • count_words
      • date_format
      • default
      • escape
      • indent
      • lower
      • upper
      • nl2br
      • regex_replace
      • replace
      • spacify
      • string_format
      • strip
      • strip_tags
      • truncate
      • wordwrap
    • Combining Modifiers
    • Configuration Files
    • Summary
 

 

 

Paperback 250 pages
Released: April 2006
ISBN: 190481140X



eBook Version Also Available
Buy the book & eBook together and get 80% off the eBook

     

 




View the book details
on PacktPub.com

 

 

 

  This website is owned and maintained by Packt Publishing Ltd, 2006. All rights reserved. Terms and Conditions