Codeigniter admin panel ecommerce free download. Codeigniter Admin Template Codeigniter Admin Template is a Ultimate Codeigniter Material + Bootstrap 4 integrated admin templat. PaperShala is a web based online exam software developed on Codeigniter (PHP). You can run on your own domain or you can also conduct free exams on PaperShala Domain. Grocery CRUD is released with dual. V1.6.3 Grocery CRUD for Codeigniter 3 Compatible with Codeigniter version 3.x Also check: change logs, github codebase and video tutorial. Latest - v2.0.1. (MIT license), free of charge. This is a one man project and all the time and effort to develop and maintain this project is dedicated. Website designers use HTML coding for their websites and usual choice is an HTML template but what they miss out on is the fact that more dynamic their website gets, more is the number of repeat traffic.Thus, high is the SEO rank.HTML templates are easy to install and with simpler coding but PHP templates are comparatively flexible.
Introduction
This tutorial will show you an example on how to use template in Codeigniter 3. In an web application a template is recommended because there are certain regions or areas which are common to all pages and only the body portion of the page gets changed. Common areas like header, footer, left sidebar or right sidebar are mainly common areas for most of the web applications. So we will fix those common areas in the template file so that every page will use those common areas in the application and body portion of each page will contain content which is specific to the page.
We will use here Colin Williams template library to demonstrate the template system in Codeigniter 3. Nowadays the Williams Codeigniter Template library is no longer being supported or improved, the last version produced was 1.4.1. So to make it work with Codeigniter 3, I have done a little modification to it.
If you want to use Template library with Codeigniter 2 then you can read https://roytuts.com/using-template-in-codeigniter/.
Now we will see step by step process how can we use the template library in Codeigniter 3 application.
Prerequisites
XAMPP in Windows
Netbeans 8.1
Codeigniter 3.0.6 3.1.10, PHP 7.0
Example with Source Code
Configuring XAMPP and Netbeans
From Netbeans IDE go to Tools->Options. Click on PHP. Now on tab “General” browse the file for “PHP 5 Interpreter”. The php interpreter file generally placed inside the <physical drive in Windows OS>:xamppphpphp.exe
Configuring Codeigniter and Netbeans
Create a new PHP project in Netbeans. Then remove the index.php file from the newly created project. Now copy the extracted files from Codeigniter 3.0.6 3.1.10 to the newly created project directory.
Working with Template
Step 1. Create a template.php file under application/config directory with below source code. This is the template configuration file used define as many as template view files with different regions. These regions can be replaced by dynamic content for each page. Here we are using only one template as a view file for entire application so we have only one template group. If you need to know how to use multiple template files for an application then you can look at https://roytuts.com/separating-front-end-and-back-end-in-codeigniter/
We have defined two regions title and content because those two regions will be changing according to the page content. You can also define other regions if you want them to be updated according to the page content. We have used the Codeigniter’s default parser to parse the template regions. We have used parse_template to TRUE to parse the template.
Step 2. Now we will see the template library file. Put the below source code in Template.php file under application/libraries directory. The original template class is little different from what I presented here because here I changed the class name from CI_Template to Template and also I have added one extra region _meta => array() for giving provision for every page to add meta key/value.
Step 3. So we need to load the template library only once and the template library will be used in subsequent requests. So autoload it using autoload.php configuration under application/config directory.
Also do the following
Step 4. Add below config to the file application/config/config.php
Step 5. Create an assets directory in parallel with application folder as shown in below figure.
Please note that we are now using Codeigniter 3.1.10 and project root directory is now Codeigniter-3.1.10-template but the directory structure is same as old.
Download here assets
Step 6. Create a template view file template.php under application/views/templates directory
Step 7. Create common regions view files header.php and footer.php files under application/views/templates/snippets.
header.php
Codeigniter Template Library
footer.php
Step 8. Now we will change our application/core/MY_Controller.php file to use template
Step 9. Now change application/modules/site/controllers/site.php to use template
Step 10. Change the view file in application/modules/site/views/home.php
Step 11. Also change application/modules/signin/controllers/signin.php to use template
Step 12. Change the view file in application/modules/signin/views/signin.php
Testing the Application
Php Codeigniter
Home page
Signin Page
Source Code
Thanks for reading.
Codeigniter Simplicity is a Codeigniter Template Library that is here to make our life easier.
It's been a while that there is not any official Template/Layout library inside Codeigniter. In that case I've created the Codeigniter Simplicity that is based on core functionalities of Codeigniter as it represents to me the 'How it should be' project.
The code is really simple to use and the naming of the functions are pretty obvious of what they are doing without any more complexity
Obviously the first thing that you have to do is downloading the library. Make sure that you have Codeigniter at your project before using this library. They are two options to download the library:
Download latest stable version 0.7 or download latest development version from github
Once downloaded, unzip the compressed folder and copy the folder into your codeigniter Project. That's it really! You don't need any configuration to do and your previous project will be as it was before.
To help you understand how your project will be after the copying of the files and folder, it should look something like this:
This is a good structure for your templates
A good way to start actually is by checking the examples that the project has inside. There is a Controller with name Example and there they are lot of examples of how to use Codeigniter Simplicity
The Controller Example will look something like this:And the template file:Code | Description | Example |
---|---|---|
$this->output->set_template($template) | Set a template | $this->output->set_template('default'); |
$this->output->unset_template() | Unset any template that was set | $this->output->unset_template(); |
$this->load->section($section, $ci_view [, $data ]); | Load a section to the template | $this->load->section('sidebar', 'ci_simplicity/sidebar'); |
$this->load->get_section($section); | Get the section at the template | $this->load->get_section('sidebar'); |
$this->load->js($js_files); | Load js files | $this->load->js('assets/js/jquery.min.js'); |
$this->load->css($css_files); | Load css files | $this->load->css('assets/css/general.css'); |
$this->output->set_canonical($canonical); | Add canolical metatag | $this->output->set_canonical(site_url('about')); |
$this->output->set_meta($name,$content); | Add metatag | $this->output->set_meta('description','Lorem Ipsum'); |
$this->output->set_common_meta($title, $description, $keywords) | Set common meta Data | $this->output->set_common_meta('About me', 'This is a page about me', 'about, John, CV'); |
Codeigniter Free Download
If you've successfully installed the template library, the very next step would be to create a CRUD for your Codeigniter application. Fortunately this is very easy as well and you can achieve a full CRUD with just few lines of code.
Codeigniter View Template
Grocery CRUD is a completely free library for Codeigniter and It is seriously very easy to work with. For example in order to have a full CRUD, you will just need the below lines of code:
For more about Grocery CRUD, you can visit the page: www.grocerycrud.com