Skip to content

angel333/sublayouts

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 

Repository files navigation

============
 SubLayouts
============

Allows you to use nested layouts.

Installation:
-------------
1) Save this plugin to your plugins directory
2) Set Controller::view to 'SubLayouts.SubLayouts' (e.g. in AppController)

Usage:
------
Let's say you have a controller named PostsController and action edit() in it..
.. now this:
$this->layout = 'first>~second>third';
$this->render('~forth>fifth>~sixth');
.. should result in this:
+---------------------------------------------------+
| views/layouts/first.ctp                           |
| +-----------------------------------------------+ |
| | views/posts/layouts/second.ctp                | |
| | +-------------------------------------------+ | |
| | | views/layouts/third.ctp                   | | |
| | | +---------------------------------------+ | | |
| | | | views/posts/layouts/forth.ctp         | | | |
| | | | +-----------------------------------+ | | | |
| | | | | views/layouts/fifth.ctp           | | | | |
| | | | | +-------------------------------+ | | | | |
| | | | | | views/posts/layouts/sixth.ctp | | | | | |
| | | | | +-------------------------------+ | | | | |
| | | | +-----------------------------------+ | | | |
| | | +---------------------------------------+ | | |
| | +-------------------------------------------+ | |
| +-----------------------------------------------+ |
+---------------------------------------------------+

Author:
-------
Ondrej Simek
email: andrew@ondrejsimek.com
web: http://ondrejsimek.com

Github:
-------
http://github.com/angel333/sublayouts

About

Allows you to use nested layouts in CakePHP.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages