Home » Smarty11 July 2008

Smarty Template Engine: How to install and use? [BEGINNER’S GUIDE]

In this article, I will be introducing how to use Smarty Template engine. This is a beginner tutorial.

First of all, you need to download Smarty from http://www.smarty.net/download. You can follow a quickstart guide from here as well: http://www.smarty.net/quick_install. My approach of coding is a bit different than the quickstart guide present on smarty website.

First, you download the latest version of Smarty; extract it and put it on your website. So, your Smarty path will be like: http://example.com/smarty/

I have the following files and directory structure:

ConnectSmarty.class.php defines the different temp directories.

index.php assigns content and calls index.tpl file.

index.tpl displays the content as assigned by index.php.

Hope it helps.


Get New Post by Email

Find me on

FacebookTwitterGoogle+LinkedInRSS Feed