-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathREADME
More file actions
executable file
·34 lines (23 loc) · 756 Bytes
/
Copy pathREADME
File metadata and controls
executable file
·34 lines (23 loc) · 756 Bytes
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
Helper to load Assets to your project.
To use this helper you must create a public folder into your home directory.
public/
public/css
public/js
You may use a different folder, and set it up on your "assets.php" file inside the config folder.
In order to use it you can do like this:
$data['css'] = load_css('global.css');
// -- OR --
$data['css'] = load_css(array('global.css','page.css'));
// -- OR --
$data['css'] = load_css(array(
array('screen.css', 'screen, projection'),
array('print.css', 'print'),
));
$data['js'] = load_js(array('js1.js','js2.js'));
$this->load->view('example',$data);
example.php
<head>
<?php echo $js; ?>
<?php echo $css; ?>
</head>
To load an image you can use <img src="<?php echo load_img('flowers.jpg') ?>" />