All things Smarty can be found at
smarty.php.net including quick-start quide called the Crash Course, Documentation, and forums.
Look up the "cycle" command in the documentation. There is a basic example in the crash course near the bottom of the page.