Hello, I’m Sutriman and I’ll share about web programming best practice, especially about dynamic multi menu and CodeIgniter Framework. As you know, CodeIgniter is one of the best PHP framework by EllisLab. There is so many library included in a package. In addition you can find too many library and helper in internet by thirdparty.
I’ve been talk about some libraries that maybe will help us to speed up the work. Now, I’ll tell you how to setup the dyanmic multilevel menu using simple library that you cand find it in Github.
Now, just follow the steps;
- Clone or Download the library here. The package is not only library, but its completly the CodeIgniter project.
- So, If you just want to know the sample about this library, you can extract the .zip file in your docroot. Or if you using git, just clone in to docroot.
- Open your SQL Client, and create new database with name anything that you want.
- Import
ci_multilevel_menu.sql
into your new database. - And then, just look at the database config of the app in application/config/database.php , and settup as your local setting. Fill the username and password as you have, and the database name as your new database that you created before.
- open the app in browser and you got the example of multilevel menu project.
Another way, how to combine the library into our existing project? It’s too simple with this library. You just need to;
- Copy and paste
application/config/multi_menu.php
to your own project - Copy and paste
application/libraries/Multi_menu.php
to your own project
More about this library, you can read theĀ documentation in github. The documentaion is complete and will help you to customize the library.