Codeigniter Library to construct frontend with integrated support for
- Bootstrap 4.0A
- jQuery
- Font Awesome 5
- Animate CSS
- optional directory based css loading
- optional js run file
- Favicon
- Meta / Page title
Composer: will be coming soon..
manual:
- Copy the PageConstructor.php to
/application/libraries/
- load PC to CI whit auto or manual method.
- Optional edit the settings/switches in the PageConstructor as you need.
- Construct your HTML header with
$this->PC->HEAD();
- Construct your Footer with
$this->PC->FOOTER();
to the end of your content.
- Now your frontend contains all nessesery files to use bootstrap 4 &
implement the CodeIgniterigniter standard library load method in the __construct
or in the function
.
Example:
$this->load->library('PageConstructor' => 'PC');
change in /application/config/autoload.php
around line 61..
$autoload['libraries'] = array();
To
$autoload['libraries'] = array('PageConstructor' => 'PC');
now you can use PC as an object ready to generate the frontend boring part :)
if the PageConstructor is loaded with AutoLoader
class Home extends CI_Controller {
public function __construct() {
parent::__construct();
$this->PC->HEAD();
}
public function index() {
if($this->uri->segment(1) != NULL && $this->uri->segment(2) != NULL){
$data["loadThisView"] = $this->uri->segment(1)."/".$this->uri->segment(2);
$this->load->view('template.php', $data);
}else{
$this->load->view('main.php');
}
}
}
<?php
if(isset($loadThisView)){
$this->load->view($loadThisView);
}else {
echo '<pre>content not loaded, error</pre>';
}
$this->PC->FOOTER();
?>