-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathREADME
46 lines (41 loc) · 1.51 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
============
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: [email protected]
web: http://ondrejsimek.com
Github:
-------
http://github.com/angel333/sublayouts