Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/nojimage/CakePHP-TALTAL
PHPTAL for CakePHP
https://github.com/nojimage/CakePHP-TALTAL
Last synced: 3 months ago
JSON representation
PHPTAL for CakePHP
- Host: GitHub
- URL: https://github.com/nojimage/CakePHP-TALTAL
- Owner: nojimage
- Created: 2011-06-02T12:40:14.000Z (over 13 years ago)
- Default Branch: master
- Last Pushed: 2013-08-02T12:48:24.000Z (over 11 years ago)
- Last Synced: 2024-05-29T23:22:29.516Z (6 months ago)
- Language: PHP
- Homepage: http://php-tips.com
- Size: 322 KB
- Stars: 21
- Watchers: 2
- Forks: 4
- Open Issues: 3
-
Metadata Files:
- Readme: README.textile
Awesome Lists containing this project
README
h1. CakePHP TALTAL - PHPTAL View plugin
PHP 5.3+, CakePHP 2.1+
This plugin provides PHPTAL View Class
Copyright 2013, php-tips.com (http://php-tips.com)
!https://travis-ci.org/nojimage/CakePHP-TALTAL.png?branch=master!:https://travis-ci.org/nojimage/CakePHP-TALTAL
h2. Plugin Installation
git submodule add -f https://github.com/nojimage/CakePHP-TALTAL.git plugins/Taltaland get PHPTAL library.
cd plugins/Taltal
git submodule update --inith2. Usage
in app/Config/bootstrap.php
CakePlugin::load('Taltal');or
CakePlugin::loadAll();in AppController
class AppController extends Controller {
// ...(snip)
public $viewClass = 'Taltal.Phptal';
// ...(snip)
}set vars in controller action.
class PostsController extends AppController {
function index() {
$people = array(
array('name' => 'foo', 'phone' => '01-344-121-021'),
array('name' => 'bar', 'phone' => '05-999-165-541'),
array('name' => 'baz', 'phone' => '01-389-321-024'),
array('name' => 'quz', 'phone' => '05-321-378-654'),
);
$this->set(compact('people'));
}
}and create view file, extension is .html or .xhtml or .zpt
eg. app/View/Posts/index.html
Name
Phone
person's name
person's phone
sample name
sample phone
sample name
sample phone
h2. LICENSE
http://www.gnu.org/licenses/lgpl.html GNU Lesser General Public License
h2. Thanks
Support for CakePHP2.0. Thanks!: Juracy Filho https://github.com/juracy
PHPTAL :: Template Attribute Language for PHP 5
Using PHPTAL for templates: PhptalView class | The Bakery, Everything CakePHP