Skip to content

maxbohr/ConfigAdmin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 

Repository files navigation

ConfigAdmin

Plugin For Cakephp

Q. What is ConfigAdmin Plug-in?
A: ConfigAdmin Pulgin is management of custom configuration file.
We created this plugin on top of available functionality in cakephp 2.1
Ref: http://book.cakephp.org/2.0/en/development/configuration.html#reading-and-writing-configuration-files
To use this plugin you must have cakephp version 2.1+

Q. Why to use ConfigAdmin?
A: It gives ability to end-user to modify key-value pairs in configuration file through simple UI design.

Q. How to use ConfigAdmin?
A: Follow the steps :
1. Download plugin from
2. Copy / Paste ~/plugin/ConfigAdmin folder to your app/Plugin folder.
3. Copy / Paste config_admin_codes.php file into app/Config folder.
4. That’s it now you can test it. http://your-project-name/config_admin/settings
If you are testing it on localhost then - Ex. localhost/your_project/config_admin/settings
5. Now you can use config_admin_codes.php file by loading it in your controller to set it in view.
6. Load config_admin_codes at the top of controller. Read it in any of action wherever you want to use configuration file.

Ex.

    <?php
        App::uses('AppController', 'Controller');
        Configure::load('config_admin_codes');  //Loding config file
        class ContactsController extends AppController {
        	public function index() {
                $this->Contact->recursive = 0;
                $this->set('contacts', $this->paginate());

                $codes=Configure::read('config_admin_codes'); //Reading config file
                $this->set($codes);  //setting config values to view
            }
        }
    ?>

For more detailed example please download our demo.(Under Construction...)

Releases

No releases published

Packages

No packages published