You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Dec 17, 2024. It is now read-only.
Copy file name to clipboardExpand all lines: README.md
+61-12Lines changed: 61 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,16 +1,64 @@
1
-
# CI-Theme - CodeIgniter Themes
2
-
I tried a lot of templates and themes libraries and I was satisfy with them but I decided to make my own, as simple as it can get. So here is my library, free to use, like **CodeIgniter**.
3
-
**NOTE**: Sublime text auto completions has been added to the repo.
4
-
## What's CI-Theme?
5
-
CI-Theme is a library that helps you make your CodeIgniter application theme-able :D. Just download it, drop files into their respective folders (__content__ folder is public). Voilà.
1
+
#CodeIgniter Theme Library
2
+
There are plenty of CodeIgniter template library. I tried most of them and I must say that they rock. Though, I had to make my own that suits my needs and that may be easy to implement, easy to understand and easy to use.
6
3
7
-
## How To Install?
8
-
As I said above, simply drop all given files, configure and voilà, tout est prêt :), everything is set.
4
+
## What is this library about?
5
+
It offers you the possibility to implement theming feature to your CodeIgniter applications with simple folders structure and ease of use (It works even when using **HMVC**).
9
6
10
-
## What to do after?
11
-
You are given a folder names **content** inside which you have **theme** and **uploads**. All your themes files go under _content/themes_ (simply follow the example of the **default** theme)
7
+
## How to install?
8
+
All you have to do is to download provided files into your CodeIgniter install and you are done. Of course, some configuration need to be done and THEN you are really done.
9
+
10
+
## Files provided
11
+
This library comes in two (**2**) parts, the first goes into your application folder and the other in your public accessible folder (_public_html_, _www_...)
12
+
13
+
#### Folders structure
14
+
15
+
- application
16
+
- config/theme.php
17
+
- helpers/theme_helper.php (_NOT NEEDED_)
18
+
- libraries/Theme.php
19
+
20
+
- content
21
+
- common
22
+
- themes
23
+
- default
24
+
- assets/
25
+
- views/
26
+
- _layouts/
27
+
- default.php
28
+
- _master/
29
+
- default.php
30
+
- _modules/
31
+
- _partials/
32
+
- alert.php
33
+
- footer.php
34
+
- header.php
35
+
- sidebar.php
36
+
- semantic (same as above)
37
+
- uploads
38
+
Other files are simply either **css**, **js** or **images**.
39
+
40
+
##Library Methods
41
+
42
+
-**set**: sets variables to pass to view files.
43
+
-**get**: get something from theme config property.
44
+
-**theme**: changes the current theme.
45
+
-**master**: changes the master view file to use.
46
+
-**layout**: use a different layout.
47
+
-**title**, **description**, **keywords**: set page's meta tags content.
48
+
-**add_meta**, **meta**: the first one appends a meta tag and the other one displays the full html <meta> tag.
49
+
-**assets_url** and **uploads_url**: both return the full URL to their respective folders. (_content/assets_ and _content/uploads_)
50
+
- Methods on **CSS** and **JS** (I use **x** to represente them both):
51
+
- **add_x**: adds the file to files list.
52
+
- **append_x**: adds the at the beginning of files list.
53
+
- **remove_x**: remove a file from files list.
54
+
- **replace_x**: replaces a file by a new one.
55
+
- **get_x**: returns an array of loaded **X** files.
56
+
- **x_url**: returns the full url to **X** file.
57
+
- **x**: css() or js() display full html tag with the given file.
58
+
59
+
## Where are files located?
60
+
CI-Theme library looks for views in a particular order so that everything can be overridden. Here is in order where files should be:
12
61
13
-
This library works as well when in **HMVC**. It will look for views in the following order:
0 commit comments