Thule - 0.9.6
  • Welcome
  • Introduction
  • - MVC(Model-View-Controller)
    - Architecture of Framework
    - Flow Chart of Application
    - Services In One Server
    - Developing Guide
    - Features
  • Installation
  • Getting Started
  • - Direct Access HTTP
    - Router Access HTTP
    - Router Direct Access HTTP
    - Reserved Function
    - Convention
    - Bootstrap
    - Pack Javascript , CSS
  • Basic Modules
  • - Model
    - View
    - Controller
  • Libraries
  • - Router
    - Config
    - Response
    - Request
    - Database
    - Query
    - Cache
    - Debug
    - Log
    - Unit Test
    - Registry
    - Profile
  • Helper
  • - Auth
    - Calendar
    - Date
    - Error page
    - Email
    - Form
    - GeoIP
    - Google
    - Html Element
    - Html
    - Http
    - I18n
    - Image
    - Json
    - Jquery
    - Login
    - Layout
    - Locale
    - PHP to Javascript
    - Paging
    - Payflow
    - Soap
    - Text
    - Table
    - Uri
    - Upload
    - Validation
  • Plugins
  • - Smarty Template Engine
  • History
  • Home > Smarty Template Engine

    Smarty Template Engine is very popular to php frontend developer even though I am good expert of smarty template, I don't like to use the template engine because of performance.
    However I have prepared smarty template engine for the frontend user.
    If you need futher information about smarty , go Here.
    And If you want other template engine ,you can put them in with a plugin.
    Configure : config/dev_config.php

    //template engine configure
    $config['template_path']=PLUGINS_PATH.'/Smarty/libs';
    $config['template_view_dir']= VIEWS_PATH;
    $config['template_compile_dir']= LOG_PATH.'/smarty/templates_c';
    $config['template_cache_dir']= LOG_PATH.'/smarty/cache';
    $config['template_config_dir']= LOG_PATH.'/smarty/configs';

    $config['template_left_delimiter']= '<{';
    $config['template_right_delimiter']= '}>';

    Below is template initial in view class (libraries/view.php)

    private function initTemplate() {
        require_once(Config::get('template_path').'/Smarty.class.php');
        $this->_template=new Smarty();
        $this->_template->caching = FALSE;

        $this->_template->template_dir = Config::get('template_view_dir');
        $this->_template->compile_dir = Config::get('template_compile_dir');
        $this->_template->cache_dir = Config::get('template_cache_dir');
        $this->_template->config_dir = Config::get('template_config_dir');

        $this->_template->left_delimiter = Config::get('template_left_delimiter');
        $this->_template->right_delimiter = Config::get('template_right_delimiter');
    }