# Admin Panel Navbar Text - Source Reference

## How it Works
The navbar text is dynamically set by the `$data['page_title']` variable in each controller method and displayed in [application/views/admin/header.php](application/views/admin/header.php#L1753).

---

## Sidebar Content Mapping to Navbar Text

| Sidebar Item | Controller Method | Line # | Page Title | View Line |
|---|---|---|---|---|
| **Analytics** | `dashboard()` | [52](application/controllers/Admin.php#L52) | `'Admin Analytics'` | [1753](application/views/admin/header.php#L1753) |
| **Members** | `users()` | [62](application/controllers/Admin.php#L62) | `'User Management'` | [1753](application/views/admin/header.php#L1753) |
| **Members** | `user_create()` | [86](application/controllers/Admin.php#L86) | `'Create User'` | [1753](application/views/admin/header.php#L1753) |
| **Members** | `user_edit()` | [136](application/controllers/Admin.php#L136) | `'Edit User'` | [1753](application/views/admin/header.php#L1753) |
| **Projects** | `campaigns()` | [242](application/controllers/Admin.php#L242) | `'Campaign Management'` | [1753](application/views/admin/header.php#L1753) |
| **Projects** | `campaign_create()` | [251](application/controllers/Admin.php#L251) | `'Create Campaign'` | [1753](application/views/admin/header.php#L1753) |
| **Projects** | `campaign_view()` | [282](application/controllers/Admin.php#L282) | `'Campaign Details'` | [1753](application/views/admin/header.php#L1753) |
| **Projects** | `campaign_edit()` | [296](application/controllers/Admin.php#L296) | `'Edit Campaign'` | [1753](application/views/admin/header.php#L1753) |
| **Planner** | `message_schedules()` | [355](application/controllers/Admin.php#L355) | `'Message Scheduler'` | [1753](application/views/admin/header.php#L1753) |
| **Records** | `master_data()` | [484](application/controllers/Admin.php#L484) | `'Master Data Management'` | [1753](application/views/admin/header.php#L1753) |
| **Insights** | `reports()` | [621](application/controllers/Admin.php#L621) | `'Reports'` | [1753](application/views/admin/header.php#L1753) |
| **Access History** | `login_logs()` | [655](application/controllers/Admin.php#L655) | `'Login Logs'` | [1753](application/views/admin/header.php#L1753) |
| **Actions** | `activity_logs()` | [668](application/controllers/Admin.php#L668) | `'Activity Logs'` | [1753](application/views/admin/header.php#L1753) |
| **Account** | `profile()` | [682](application/controllers/Admin.php#L682) | `'My Profile'` | [1753](application/views/admin/header.php#L1753) |

---

## Display Location in View

The navbar text is displayed in **[application/views/admin/header.php](application/views/admin/header.php)** at:

- **Line 1753**: The `page_title` variable is echoed in the top navbar:
  ```php
  <h5 class="page-title"><?= isset($page_title) ? $page_title : 'Analytics' ?></h5>
  ```

---

## Key Points

1. **Controller Sets Title**: Each Admin controller method sets `$data['page_title']` with a specific string
2. **Passed to View**: The data array is passed to `header.php` via `$this->load->view('admin/header', $data)`
3. **Default Value**: If `page_title` is not set, it defaults to `'Analytics'`
4. **Dynamic Display**: The navbar text changes based on which sidebar item/page the user is on
