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 >Layout

    This helper is for Layout of each page and caching the page what you want.e

    How to set the Layout.

    When you load the this helper, it will be set by first path of uri.

    ex) www.thuleframework.com/forum/post // forum will be layout

    $Frontend->loadHelper("layout");

    How to get the layout

    Sometimes you need to use the layout for several page's include, such as main page, forum page, login page. every each other pages are needed to be included different css,js and page style.

    Just call below is make you be more convenient to let the page be different.

    $Frontend->Layout;

    How to set the page cache.

    Regards of cache you need to have a look at the cache section.

    first parameter is for file and seconds pararmeter is to set the option.

    If Second parameter has no cache variable, it will be not cached. And you can set the cached term by term variable in array.

    echo $Frontend->Layout->inc("mvc/sub/subTemplate.php",array("cache"=>true,"term"=>1*60));