We have already solved the main problem of adding, editing, deleting multilevel categories into a database table. Now when we have a lot of data in the table, we must show them in a multilevel fashion also. Here is a solve for this thing. I have used the beautiful jQuery apycom menu. The calling of the function is very straight forward. Include the new “lzmlm.php” file shared with this post. Visit http://apycom.com where you can get a lot of beautiful menu. Download the menu of your choice and extract the zip file inside “js/jquery/plugins”. Include “menu.js” and “menu.css” in your current file where you want to place the menu. Now call the following function to render the menu in your desired position.
In this release some features has been added to the previous version. CRUD has been implemented. For enhancing the environment a breadcrumb has also been placed in header through which you can jump to parent category quickly. Read the rest of this entry
Read the rest of this entry
In lot of applications we need multi-level category management. In this example I have created an interface to manage multi-level categories. In this interface you can manage, up to which level you would allow an user to add sub-categories. You have to supply the “maxLevel” in the getCategory() function. If you don’t supply this value then it will go up to 10th level.
Another feature of this interface is the select box. The options in this select box maintain a left-padding for each level down. By this way they are grouped under their parent. This is visually appealing and easy to use.
The fields of the form will be needed in case of making the application SEO compatible. The slug is needed as the URL Key. You have to make this slug unique. So placing some AJAX in the form would validate if it is available or not.