Create a cashier application using CodeIgniter 3 – Part 2: Icon menu, page title, and active menu. Today, we’re going to add icons to the sidebar and make the menu items active based on the current page. We’ll also ensure that the page title changes dynamically. First, update the base url in the config file to display the icons, then clear the index.php from the config.php. Next, update the set bar with the appropriate icons for each menu item and add logic to make the menu items active based on the current page. Finally, update the page title dynamically based on the current page. Make sure to follow these steps carefully for a successful implementation. Good luck! π
Table of Contents
ToggleSetting Up Icon and Active Menu π©βπ»
Oke pada video kali ini saya akan melanjutkan dari pertemuan sebelumnya sebelumnya kita UD selesai membuat halaman templating layout jadi tempil seperti ini selanjutnya eh di bagian video kali ini saya akan membahas terkait ikon pada set bar ini enggak mau tampil kemudian kita buat juga aktif menu pada setb jadi nanti ini di bagian dashboard harusnya ada aktifnya jadi kalau kita buka template-nya ee bagian admin yang…
Summary:
- Video continuation from the previous meeting
- Explanation about setting up icon and active menu
- Focused on dashboard and admin menu
Key Takeaways:
- Ikon configuration in the ‘config.php’ file
- Indication of items using PHP segments
- Changing the menu’s settings
Configuring Icon and Base URL π₯οΈ
The first thing we need to do is to address the issue of image icons not appearing. To resolve this, we need to navigate to the ‘config’ folder and input the appropriate coding in the ‘config.php’ file. Once this is in place, we will be able to properly point towards the icons.
Code Configuration:
Folder/File | Description |
---|---|
asset output file | Location of base URL |
base url txt file | Store the base URL |
indeks php file | Removal of indeks PHP |
Setting Up Active Menu π
In this part, we will delve into the process of setting up the active menu. This guarantees that the displayed menu will be dynamically linked and active based on the current page. By utilizing segments and PHP functions properly, it will dynamically display the ‘active’ status for the relevant menu item.
Conclusion
In conclusion, the process of setting up the icon, base URL, and active menu is critical to creating a seamless user experience. It is essential to ensure that all elements, including icons and active menus, are displayed accurately.
Key Takeaways:
- Proper navigation to the config folder
- Elimination of unnecessary coding
- Implementation of dynamic active menu components
Related posts:
- Beachfront condo for sale near Dumaguete, Philippines. Ideal for retirement or travel. Trending property, priced at 18 million PHP. #beachfrontcondo #Dumaguete #Philippines
- “Next week is dangerous! Bond king warns: Move to safety fast!”
- Mozilla announces new CEO, Apple disrupts PWA, and Wine now available on Android: the latest in Linux and Open Source news.
- Part 2: .NET API Hosting Model | Introduction to Back-end Web Development with .NET for Beginners
- Create your own AI application in just 5 minutes!
- Discovering Love through Ziwe