Skip to content

Commit f3240e0

Browse files
committed
Documentation to release 1.0.6
1 parent 59a676f commit f3240e0

1 file changed

Lines changed: 29 additions & 1 deletion

File tree

README.md

Lines changed: 29 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ public function beforeRender(Event $event)
100100
}
101101
```
102102

103-
After you enable the AdminLTEView class in the AppController.php file, you can overwrite any View file, only by creating the Plugin / AdminLTE / folder inside the Template folder.
103+
After you enable the AdminLTEView class in the AppController.php file, you can overwrite any View file, only by creating the `Plugin/AdminLTE/` folder inside the `Template` folder.
104104

105105
For example, to overwrite the elements files, you must create them as follows:
106106

@@ -119,6 +119,34 @@ For example:
119119
1. `src/Template/Plugin/AdminLTE/Element/footer.ctp`
120120
1. `src/Template/Plugin/AdminLTE/Admin/Element/footer.ctp`
121121

122+
In summary, the sequence of folders in which to check if that file exists is as follows:
123+
124+
1. `src/Template/Plugin/$theme/Plugin/$plugin/$prefix/`
125+
2. `src/Template/Plugin/$theme/Plugin/$plugin/`
126+
3. `src/Template/Plugin/$theme/$prefix/`
127+
4. `src/Template/Plugin/$theme/`
128+
129+
For example, Let's say:
130+
131+
* $theme = 'AdminLTE';
132+
* $plugin = 'SupportTicket';
133+
* $prefix = 'Admin';
134+
135+
Therefore, the sequence that would verify the existence of a file, would be the following:
136+
137+
1. `src/Template/Plugin/AdminLTE/Plugin/SupportTicket/Admin/`
138+
2. `src/Template/Plugin/AdminLTE/Plugin/SupportTicket/`
139+
3. `src/Template/Plugin/AdminLTE/Admin/`
140+
4. `src/Template/Plugin/AdminLTE/`
141+
142+
For the sake of clarity, let's say you have two environments separated by different prefixes: *Panel* and *Admin*.
143+
144+
The *Dashboard* enviroment has no menu and footer, but Admin has.
145+
146+
To solve this situation is very simple. You should create in the folder `src/Template/Plugin/AdminLTE/Panel/` the elements `aside/sidebar-menu.ctp` and` footer.ctp` with empty content.
147+
148+
However, for *Admin*, you should create `aside/sidebar-menu.ctp` in `src/Template/Plugin/AdminLTE/Admin/` or if you want to leave general, regardless of prefix, you should create in `src/Template/Plugin/AdminLTE/`. Similarly with the `footer.ctp`.
149+
122150
### Page debug
123151

124152
Added link to default page of CakePHP.

0 commit comments

Comments
 (0)