phpsource/템플릿2007. 9. 1. 17:09
written: Sep 1 2007
 
This document is not the official document in the version which is to in the process of developing. When the hereafter official document is announced consequently, the contents could more or less be changed.
Table of Contents
What is Tempo?
TEMPO(acronym for "TEMPlate Object") is a template engine for PHP. A template is an HTML document with variables in it. Tempo template engine provide basic variable substitution and dynamic block functionality. Here is a simple template with one variable ('{?=$name?}');
[code html;gutter:false] <p>Hello {?=$name?}. How are you?</p> [/code]
When a template is parsed, the variables are interpolated to HTML document.
[code html;gutter:false] <table> <tr> <th>column1</th> <th>column2</th> <th>column3</th> </tr> <tr tempo:id="eLoop"> <td>{?=$column1?}</td> <td>{?=$column2?}</td> <td>{?=$column3?}</td> </tr> </table> [/code]
The notation of the block element 'eLoop' and the Zope ZPT is similar(see zope websize).
Installation
Simply copy the class file somewhere where your script can include it, and then include it.
[code php;gutter:false] <?php require_once('somewhere/class.Tempo.php'); . . . ?> [/code]
License
hwooky's tempo(template object) is licensed using LGPL.
Copyright (c) 2006-2007 Wookyung Hwang(hwooky@phpclass.com).
All rights reserved.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.

This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.

-GNU LESSER GENERAL PUBLIC LICENSE (LGPL)

Address Bug Reports or Comments on THIS LIBRARY ONLY to
Wookyung Hwang, hwooky@phpclass.com
The latest version of this class should be available from the following locations:
http://tempo.phpclass.com

For more info about hwooky's tempo(template object),
visit www.phpclass.com

'phpsource > 템플릿' 카테고리의 다른 글

{Tempo}3.Template contents  (0) 2007.09.01
{Tempo}2.Step by step  (0) 2007.09.01
{Tempo}1.Introduction  (0) 2007.09.01
{후키템플릿}9.5.게시판 목록보기 구현  (0) 2006.11.03
{후키템플릿}8.3.필터 상수  (0) 2006.11.03
{후키템플릿}6.2.미리정의된 템플릿변수  (0) 2006.11.02
Posted by (www.phpclass.com) 방글24

댓글을 달아 주세요