Organize & customize the Admin Navbar

The Admin Sidebar can be organized from the Generator page
or directly edited from a simple JSON file..


Prerequisites

To build & customize your admin panel navbar with PHPCG you must beforehand:

Build & customize your admin panel navbar using the Generator

You can easily organize your tables into multiple categories, drag & drop the categories & tables, and choose any icon for each table.

Just watch the video tutorial to see how it looks.

Build & customize your admin panel navbar from the JSON file

The navbar categories & tables are stored in a simple JSON file in php-crud-generator/admin/crud-data/nav-data.json

Here's an example of JSON content:


        {
            "navcat-0": { "name": "Customer Data", "content": ["customer", "address", "city", "country"] },
            "navcat-1": { "name": "Inventory", "content": ["category", "film", "language", "actor"] },
            "navcat-2": { "name": "Business", "content": ["staff", "store", "payment", "rental", "users_profiles", "users"] }
        }
    

You can edit this file with your favourite code editor to:

  • change the categories names
  • add new categories
  • change the categories content

Note that the content MUST contain only your table names.
You CANNOT customize the table names here.

Back to Knowledge Base