https://github.com/jenkinsdev/codeigniter-includes-library
This is just a small library to allow you to include multiple view files with a single call to the include_files() method.
https://github.com/jenkinsdev/codeigniter-includes-library
Last synced: about 2 months ago
JSON representation
This is just a small library to allow you to include multiple view files with a single call to the include_files() method.
- Host: GitHub
- URL: https://github.com/jenkinsdev/codeigniter-includes-library
- Owner: JenkinsDev
- Created: 2013-01-15T01:19:45.000Z (over 13 years ago)
- Default Branch: master
- Last Pushed: 2013-01-15T01:46:12.000Z (over 13 years ago)
- Last Synced: 2025-01-25T16:11:28.969Z (over 1 year ago)
- Language: PHP
- Size: 109 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Codeigniter Includes Library
This tiny Codeigniter library is used for inserting multiple view files in an easy and managable fashion. Created and Maintained by David Jenkins.
## Getting Started
-------------------
It is extremely easy to get started with this tiny library. It takes literally 4 steps to use.
1.) Download the file and place it into your Codeigniter's application/libraries directory.
2.) Load the library as you would any normal Codeigniter library:
> $this->load->library('includes');
3.) Set your variable/properties for file names and file data as arrays or string(s):
> // Files To Include
>
> $this->files_include = array('includes/header', 'home', 'includes/footer');
>
> // File Data
>
> $this->data['includes/header']['title'] = 'Welcome Home';
> $this->data['home']['test'] = 'This is a test';
>
> OR
>
> // Files To Include
>
> $this->files_includes = 'home';
>
> // File Data
>
> $this->data['title'] = 'Welcome Home';
4.) Finally call the includes::include_files() method:
> $this->includes->include_files($this->files_includes, $this->data);